Will I be able to declare a constexpr lambda inside a template parameter?
问题 I know it's like opening the Pandora box but it doesn't stop bothering me. Consider a simple example: #include <type_traits> template <auto> struct Foo: std::false_type { }; template <> struct Foo<[](){return 1;}()>:std::true_type { }; int main() { static_assert(Foo<1>::value); } I know lambdas cannot be declared inside unevaluated context, but obviously this is not the case here. What is even more weird clang 5.0.0 (which, I guess, first partially supports constexpr lambda) does compile it.