forked from OSchip/llvm-project
0374bf0d07
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 |
||
---|---|---|
.. | ||
basic | ||
class | ||
class.access | ||
class.derived | ||
concepts-ts/dcl.dcl/dcl.spec/dcl.spec.concept | ||
conv | ||
dcl.dcl | ||
dcl.decl | ||
drs | ||
except | ||
expr | ||
lex | ||
over | ||
special | ||
stmt.stmt | ||
temp |