[Bug c++/88628] lambda expression in static_assert in if constexpr is not evaluated

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Dec 28 14:25:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88628

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
http://eel.is/c++draft/expr.prim.lambda.closure says:

The type of a lambda-expression (which is also the type of the closure object)
is a unique, unnamed non-union class type, called the closure type, whose
properties are described below.

The closure type is declared in the smallest block scope, class scope, or
namespace scope that contains the corresponding lambda-expression.

As the lambda expression in this case is contained in a block scope within the
get function template, the closure type is declared there.


More information about the Gcc-bugs mailing list