From 11a6de769ceb3c3e788c58b13c4a5b18f964a795 Mon Sep 17 00:00:00 2001 From: Casey Carter Date: Mon, 17 Jul 2017 20:02:28 -0700 Subject: [PATCH] Apply P0663R0 PR for 321: Concepts that use type traits are inadvertently subsuming them Fixes #321. --- concepts.tex | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/concepts.tex b/concepts.tex index 5c81ce0c..5b2d8da4 100644 --- a/concepts.tex +++ b/concepts.tex @@ -268,13 +268,13 @@ \indexlibrary{\idxcode{Same}}% \begin{itemdecl} template -concept bool Same = @\seebelow@; +concept bool Same = is_same::value; // \seebelow \end{itemdecl} \begin{itemdescr} \pnum -\tcode{Same} 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} and +\tcode{is_same::value}. \pnum \remarks For the purposes of constraint checking, \tcode{Same} implies @@ -309,7 +309,7 @@ \begin{itemdecl} template concept bool ConvertibleTo = - is_convertible::value && + is_convertible::value && // \seebelow requires(From (&f)()) { static_cast(f()); }; @@ -444,18 +444,28 @@ \indexlibrary{\idxcode{Integral}}% \begin{itemdecl} template -concept bool Integral = is_integral::value; +concept bool Integral = is_integral::value; // \seebelow \end{itemdecl} +\begin{itemdescr} +\pnum +There need not be any subsumption relationship between \tcode{Integral} and +\tcode{is_integral::value}. +\end{itemdescr} + \rSec2[concepts.lib.corelang.signedintegral]{Concept \tcode{SignedIntegral}} \indexlibrary{\idxcode{SignedIntegral}}% \begin{itemdecl} template -concept bool SignedIntegral = Integral && is_signed::value; +concept bool SignedIntegral = Integral && is_signed::value; // \seebelow \end{itemdecl} \begin{itemdescr} +\pnum +There need not be any subsumption relationship between \tcode{SignedIntegral} and +\tcode{is_signed::value}. + \pnum \enternote \tcode{SignedIntegral} may be satisfied even for types that are not signed integral types~(\cxxref{basic.fundamental});