Skip to content

P3168R1: use a non-pointer iterator type#18

Merged
neatudarius merged 17 commits intobemanproject:mainfrom
neatudarius:P3168R1-iterator
Jun 24, 2024
Merged

P3168R1: use a non-pointer iterator type#18
neatudarius merged 17 commits intobemanproject:mainfrom
neatudarius:P3168R1-iterator

Conversation

@neatudarius
Copy link
Member

@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 JeffGarland, camio, inbal2l and tzlaine 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
Member 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!

@neatudarius neatudarius merged commit da16ab7 into bemanproject:main Jun 24, 2024
@neatudarius
Copy link
Member 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