forked from OSchip/llvm-project
![]() This patch emits a more appropriate (but still noisy) diagnostic stream when a lambda-expression is encountered within a non-type default argument. For e.g. template<int N = ([] { return 5; }())> int f(); As opposed to complaining that a lambda expression is not allowed in an unevaluated operand, the patch complains about the lambda being forbidden in a constant expression context (which will be allowed in C++17 now that they have been accepted by EWG, unless of course CWG or national bodies (that have so far shown no signs of concern) rise in protest) As I start submitting patches for constexpr lambdas (http://wg21.link/P0170R0) under C++1z (OK'd by Richard Smith at Kona), this will be one less change to make. Thanks! llvm-svn: 253431 |
||
---|---|---|
.. | ||
temp.arg | ||
temp.decls | ||
temp.fct.spec | ||
temp.names | ||
temp.param | ||
temp.res | ||
temp.spec | ||
temp.type | ||
p3.cpp |