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

Converging toward P0896R3 (algorithms and special memory algorithms) #190

Closed
wants to merge 8 commits into from
Closed

Converging toward P0896R3 (algorithms and special memory algorithms) #190

wants to merge 8 commits into from

Conversation

cjdb
Copy link
Collaborator

@cjdb cjdb commented Aug 26, 2018

This commit moves cmcstl2 closer toward what will be in P0896R3 for San Diego.

Changes

  • Return types more closely resemble what's in R2. I created exposition-only base structs instead of creating aliases to see how well that would work with the library as a whole.
  • Removed a lot of dependency on tagged.hpp in the wake of named return types.
  • Most algorithms are now implemented as functors, and are not lookupable by ADL, as required by [specialized.algorithms]/3.1 and [algorithms.requirements]/2.
    • Many details now cannot be looked up at all: they're private static members.
    • This potentially eliminates the need for STL2_WORKAROUND_GCC_79591, as this bug doesn't seem to surface when a using declaration is made in a class definition.
  • Algorithm interfaces resemble what is present in ericniebler/stl2@19b9f15.
    • Optimisations have been made private static members that are delegated to by the public interface. The intention is to significantly reduce the noise given by diagnostics for people unaware that algorithms can be optimised for certain concepts.
  • Some, but not all, of Rng has been renamed to R.
  • safe_iterator_t now disallows rvalues: as @CaseyCarter predicted on Slack, this is problematic when passing range adapters into algorithms.

What's missing?

  • I haven't looked at shuffle yet, but I imagine it'll follow the same formula. I can add it to this branch, or I can add it to a different one.

Things that must happen before merging with master:

  • The test case for find_end is uncommitted (and incomplete) on my work computer, so I've disabled compiling that test to get this PR up early. It'll need to be committed before merging, as there are very likely issues with find_end that I haven't had the opportunity to pick up on yet.
  • I'd like to rebase and squash this. The commits are useless fluff, mostly so I could change between home and work computers.

Issues this might close

Issues this pull request opens

@cjdb
Copy link
Collaborator Author

cjdb commented Dec 11, 2018

Conflicts with master way too much, and it'll be easier to redo this in piecemeal chunks anyway.

@cjdb cjdb closed this Dec 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant