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

common_iterator::operator-> is underconstrained #366

Closed
CaseyCarter opened this issue Mar 5, 2017 · 1 comment
Closed

common_iterator::operator-> is underconstrained #366

CaseyCarter opened this issue Mar 5, 2017 · 1 comment

Comments

@CaseyCarter
Copy link
Collaborator

CaseyCarter commented Mar 5, 2017

As specified in #318. The "proxy case" constructs an object of type value_type_t<I> from reference_t<I> but does not require Constructible<value_type_t<I>, reference_t<I>>().

Proposed Resolution

Change the class synopsis of common_iterator ([common.iterator]) as follows (includes part of the resolution of #368):

 see below operator*();
 see below operator*() const requires dereferenceable<I const>;
-see below operator->() const requires Readable<I const>();
+see below operator->() const requires see below;

To [common.iter.op.ref], add a p3 that reads:

  1. The expression in the requires clause is equivalent to:
Readable<I const>() &&
  (requires (const I& i) { i.operator->(); } ||
   is_reference<reference_t<I>>::value ||
   Constructible<value_type_t<I>, reference_t<I>>())
@ericniebler
Copy link
Owner

@CaseyCarter for your review

@ericniebler ericniebler added ready and removed new labels Jul 12, 2017
CaseyCarter added a commit that referenced this issue Jul 19, 2017
366: common_iterator::operator-> is underconstrained
368: common_iterator’s and counted_iterator’s const operator* need to be constrained

Fixes #366 and #368.
CaseyCarter added a commit that referenced this issue Jul 19, 2017
366: common_iterator::operator-> is underconstrained
368: common_iterator’s and counted_iterator’s const operator* need to be constrained

Fixes #366 and #368.
ericniebler pushed a commit that referenced this issue Jul 19, 2017
* Apply P0740R0 PRs for:
366: common_iterator::operator-> is underconstrained
368: common_iterator’s and counted_iterator’s const operator* need to be constrained

Fixes #366 and #368.

* Replace "see below" with "delctype(auto)" and "constexpr" where appropriate.
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