Skip to content

Commit

Permalink
Apply P0663R0 PR for 330: Argument deduction constraints are specifie…
Browse files Browse the repository at this point in the history
…d incorrectly

Fixes #330.
  • Loading branch information
CaseyCarter committed Jul 18, 2017
1 parent 8bd78dd commit 35bf00d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 37 deletions.
21 changes: 0 additions & 21 deletions concepts.tex
Original file line number Diff line number Diff line change
Expand Up @@ -483,20 +483,10 @@

\begin{itemdescr}
\pnum
<<<<<<< HEAD
Let \tcode{t} be an lvalue which refers to an object \tcode{o} such that
\tcode{decltype((t))} is \tcode{T}, and \tcode{u} an expression such that
\tcode{decltype((u))} is \tcode{U}. Let \tcode{u2} be a distinct object that is
equal to \tcode{u}. \tcode{Assignable<T, U>} is satisfied only if
=======
Let \tcode{t} be an lvalue of type \tcode{T}, and \tcode{R} be the
type \tcode{remove_reference_t<U>}. If \tcode{U} is an lvalue reference
type, let \tcode{v} be an lvalue of type \tcode{R};
otherwise, let \tcode{v} be an rvalue of type \tcode{R}.
Let \tcode{uu} be a distinct object of type \tcode{R} such that
\tcode{uu} is equal to \tcode{v}.
\tcode{Assignable<T, U>} is satisfied only if
>>>>>>> issue_155

\begin{itemize}
\item \tcode{addressof(t = u) == addressof(o)}.
Expand Down Expand Up @@ -888,14 +878,8 @@

\begin{itemdescr}
\pnum
<<<<<<< HEAD
If \tcode{T} is an object type, then let \tcode{rv} be an rvalue of type \tcode{T}
and \tcode{u2} a distinct object of type \tcode{T} equal to \tcode{rv}.
=======
Let \tcode{U} be the type \tcode{remove_cv_t<T>},
\tcode{rv} be an rvalue of type \tcode{U},
and \tcode{u2} be a distinct object of type \tcode{T} equal to \tcode{rv}.
>>>>>>> issue_155
\tcode{MoveConstructible<T>} is satisfied only if

\begin{itemize}
Expand All @@ -922,13 +906,8 @@

\begin{itemdescr}
\pnum
<<<<<<< HEAD
If \tcode{T} is an object type, then let \tcode{v} be an lvalue of type (possibly
\tcode{const}) \tcode{T} or an rvalue of type \tcode{const T}.
=======
Let \tcode{v} be an lvalue of type (possibly \tcode{const})
\tcode{remove_cv_t<T>} or an rvalue of type \tcode{const remove_cv_t<T>}.
>>>>>>> issue_155
\tcode{CopyConstructible<T>} is satisfied only if

\begin{itemize}
Expand Down
25 changes: 13 additions & 12 deletions iterators.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,7 @@
requires(I i) {
typename difference_type_t<I>;
requires SignedIntegral<difference_type_t<I>>;
{ ++i } -> Same<I&>; // not required to be equality preserving
{ ++i } -> Same<I>&; // not required to be equality preserving
i++; // not required to be equality preserving
};
\end{codeblock}
Expand Down Expand Up @@ -1075,7 +1075,7 @@
Regular<I> &&
WeaklyIncrementable<I> &&
requires(I i) {
{ i++ } -> Same<I>;
{ i++ } -> Same<I>&&;
};
\end{codeblock}

Expand Down Expand Up @@ -1172,8 +1172,8 @@
Sentinel<S, I> &&
!disable_sized_sentinel<remove_cv_t<S>, remove_cv_t<I>> &&
requires(const I& i, const S& s) {
{ s - i } -> Same<difference_type_t<I>>;
{ i - s } -> Same<difference_type_t<I>>;
{ s - i } -> Same<difference_type_t<I>>&&;
{ i - s } -> Same<difference_type_t<I>>&&;
};
\end{itemdecl}

Expand Down Expand Up @@ -1331,8 +1331,8 @@
ForwardIterator<I> &&
DerivedFrom<iterator_category_t<I>, bidirectional_iterator_tag> &&
requires(I i) {
{ @\dcr@i } -> Same<I&>;
{ i@\dcr@ } -> Same<I>;
{ --i } -> Same<I>&;
{ i-- } -> Same<I>&&;
};
\end{codeblock}

Expand Down Expand Up @@ -1372,12 +1372,13 @@
StrictTotallyOrdered<I> &&
SizedSentinel<I, I> &&
requires(I i, const I j, const difference_type_t<I> n) {
{ i += n } -> Same<I&>;
{ j + n } -> Same<I>;
{ n + j } -> Same<I>;
{ i -= n } -> Same<I&>;
{ j - n } -> Same<I>;
{ j[n] } -> Same<reference_t<I>>;
{ i += n } -> Same<I>&;
{ j + n } -> Same<I>&&;
{ n + j } -> Same<I>&&;
{ i -= n } -> Same<I>&;
{ j - n } -> Same<I>&&;
j[n];
requires Same<decltype(j[n]), reference_t<I>>;
};
\end{codeblock}

Expand Down
9 changes: 5 additions & 4 deletions numerics.tex
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@
namespace std { namespace experimental { namespace ranges { inline namespace v1 {
template <class G>
concept bool UniformRandomNumberGenerator =
requires(G g) {
{ g() } -> UnsignedIntegral; // not required to be equality preserving
{ G::min() } -> Same<result_of_t<G&()>>;
{ G::max() } -> Same<result_of_t<G&()>>;
Invocable<G&> &&
UnsignedIntegral<result_of_t<G&()>> &&
requires {
{ G::min() } -> Same<result_of_t<G&()>>&&;
{ G::max() } -> Same<result_of_t<G&()>>&&;
};
}}}}
\end{codeblock}
Expand Down

0 comments on commit 35bf00d

Please sign in to comment.