Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

P3168R1: use a non-pointer iterator type #18

Merged
merged 17 commits into from
Jun 24, 2024

Conversation

neatudarius
Copy link
Collaborator

@neatudarius neatudarius commented Jun 19, 2024

P3168R1: use a non-pointer iterator type . Follow-up PR after #9 for suggestion made by @brevzin (issue #14) .

Updates:

  • include/Beman/Optional26/detail/iterator.hpp: Adopt normal_iterator implementation from GCC and create a simplified version into beman::optional::detail:normal_iterator.
  • include/Beman/Optional26/optional.hpp: Replace implementation for optional<T/T&>::iterator/const_iterator: T*/const* -> detail::normal_iterator<T/const T*, optional> .
  • Add more tests related to iterators.

Notes:

@neatudarius neatudarius requested review from camio, tzlaine, JeffGarland and inbal2l and removed request for inbal2l June 19, 2024 15:44
@neatudarius neatudarius marked this pull request as ready for review June 19, 2024 15:46
@neatudarius neatudarius requested a review from inbal2l June 19, 2024 16:18
@steve-downey
Copy link
Member

steve-downey commented Jun 24, 2024 via email

@neatudarius
Copy link
Collaborator Author

neatudarius commented Jun 24, 2024

I had a little time this weekend: https://github.com/steve-downey/iterator-interface It's an implementation from the wording and exposition from P2727R4 - Only "creative" bit was writing the iterator tag calculation. Did turn up some wording nits, so not totally useless.

Nice! Thanks Steve! I think we can start a chat with @tzlaine and see that's the plan for stl_interfaces inside Beman.

Note: We'll continue using sources from boost/stl_interfaces in this PR.

@neatudarius neatudarius force-pushed the P3168R1-iterator branch 2 times, most recently from 34a75c4 to e441374 Compare June 24, 2024 17:38
Copy link

@tzlaine tzlaine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a small note, but it's entirely style. The rest looks good!

include/Beman/Optional26/detail/iterator.hpp Outdated Show resolved Hide resolved
include/Beman/Optional26/optional.hpp Outdated Show resolved Hide resolved
@neatudarius neatudarius merged commit da16ab7 into beman-project:main Jun 24, 2024
4 checks passed
@neatudarius
Copy link
Collaborator Author

Merged the PR to be able to deploy into Compiler Explorer (#21 ).

Follow-up tweaks will be done in other PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants