Skip to content

Commit

Permalink
Apply P0663R0 PR for 321: Concepts that use type traits are inadverte…
Browse files Browse the repository at this point in the history
…ntly subsuming them

Fixes #321.
  • Loading branch information
CaseyCarter committed Jul 18, 2017
1 parent cae79d2 commit 11a6de7
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions concepts.tex
Original file line number Diff line number Diff line change
Expand Up @@ -268,13 +268,13 @@
\indexlibrary{\idxcode{Same}}%
\begin{itemdecl}
template <class T, class U>
concept bool Same = @\seebelow@;
concept bool Same = is_same<T, U>::value; // \seebelow
\end{itemdecl}

\begin{itemdescr}
\pnum
\tcode{Same<T, U>} is satisfied if and
only if \tcode{T} and \tcode{U} denote the same type.
There need not be any subsumption relationship between \tcode{Same<T, U>} and
\tcode{is_same<T, U>::value}.

\pnum
\remarks For the purposes of constraint checking, \tcode{Same<T, U>} implies
Expand Down Expand Up @@ -309,7 +309,7 @@
\begin{itemdecl}
template <class T, class U>
concept bool ConvertibleTo =
is_convertible<From, To>::value &&
is_convertible<From, To>::value && // \seebelow
requires(From (&f)()) {
static_cast<To>(f());
};
Expand Down Expand Up @@ -444,18 +444,28 @@
\indexlibrary{\idxcode{Integral}}%
\begin{itemdecl}
template <class T>
concept bool Integral = is_integral<T>::value;
concept bool Integral = is_integral<T>::value; // \seebelow
\end{itemdecl}

\begin{itemdescr}
\pnum
There need not be any subsumption relationship between \tcode{Integral<T>} and
\tcode{is_integral<T>::value}.
\end{itemdescr}

\rSec2[concepts.lib.corelang.signedintegral]{Concept \tcode{SignedIntegral}}

\indexlibrary{\idxcode{SignedIntegral}}%
\begin{itemdecl}
template <class T>
concept bool SignedIntegral = Integral<T> && is_signed<T>::value;
concept bool SignedIntegral = Integral<T> && is_signed<T>::value; // \seebelow
\end{itemdecl}

\begin{itemdescr}
\pnum
There need not be any subsumption relationship between \tcode{SignedIntegral<T>} and
\tcode{is_signed<T>::value}.

\pnum
\enternote \tcode{SignedIntegral<T>} may be satisfied even for
types that are not signed integral types~(\cxxref{basic.fundamental});
Expand Down

0 comments on commit 11a6de7

Please sign in to comment.