Skip to content

Commit

Permalink
CWG2517 Useless restriction on use of parameter in constraint-expression
Browse files Browse the repository at this point in the history
  • Loading branch information
burblebee committed Feb 12, 2023
1 parent 0b10921 commit 7a947d7
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions source/expressions.tex
Expand Up @@ -3055,18 +3055,6 @@
\end{codeblock}
\tcode{D<T>} is satisfied if \tcode{sizeof(decltype (+t)) == 1}\iref{temp.constr.atomic}.
\end{example}

\pnum
A local parameter shall only appear as an unevaluated operand\iref{term.unevaluated.operand}
within the \grammarterm{constraint-expression}.
\begin{example}
\begin{codeblock}
template<typename T> concept C = requires (T a) {
requires sizeof(a) == 4; // OK
requires a == 0; // error: evaluation of a constraint variable
};
\end{codeblock}
\end{example}
\indextext{expression!requires|)}
\indextext{expression!primary|)}

Expand Down

0 comments on commit 7a947d7

Please sign in to comment.