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

Remove the "Experimental additional constraints" from Readable #239

Closed
CaseyCarter opened this issue Oct 27, 2016 · 0 comments
Closed

Remove the "Experimental additional constraints" from Readable #239

CaseyCarter opened this issue Oct 27, 2016 · 0 comments

Comments

@CaseyCarter
Copy link
Collaborator

CaseyCarter commented Oct 27, 2016

From #183:

We can probably just remove these sanity checks from range-v3, cmcstl2, and the Ranges TS. I added them to keep myself honest when I was designing and implementing proxy iterator support. Now they only serve to make compile times worse. Holler if you see a reason to keep them.

I see no reason to keep them; we should strike those requirements from P0022 before moving it into the TS.

Proposed Resolution:

Wording relative to P0022R2. Change the definition of the Readable concept in [iterators.readable] as follows:

template <class I>
concept bool Readable() {
  return Movable<I>() && DefaultConstructible<I>() &&
    requires (const I& i) {
      typename value_type_t<I>;
      typename reference_t<I>;
      typename rvalue_reference_t<I>;
      { *i } -> Same<reference_t<I>>;
      { iter_move(i) } -> Same<rvalue_reference_t<I>>;
    } &&
    // Relationships between associated types
    CommonReference<reference_t<I>, value_type_t<I>&>() &&
    CommonReference<reference_t<I>, rvalue_reference_t<I>>() &&
+    CommonReference<rvalue_reference_t<I>, const value_type_t<I>&>();
-    CommonReference<rvalue_reference_t<I>, const value_type_t<I>&>() &&
-    Same<
-      std::common_reference_t<reference_t<I>, value_type_t<I>>,
-      value_type_t<I>>() &&
-    Same<
-      std::common_reference_t<rvalue_reference_t<I>, value_type_t<I>>,
-      value_type_t<I>>();
}
CaseyCarter added a commit to CaseyCarter/cmcstl2 that referenced this issue Oct 27, 2016
In indirect_result_of, decay the type of the function before passing to IndirectCallable.
CaseyCarter added a commit to CaseyCarter/cmcstl2 that referenced this issue Oct 27, 2016
CaseyCarter added a commit to CaseyCarter/cmcstl2 that referenced this issue Oct 28, 2016
CaseyCarter added a commit to CaseyCarter/cmcstl2 that referenced this issue Oct 28, 2016
@ericniebler ericniebler added ready and removed new labels Nov 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants