https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91953
Bug ID: 91953 Summary: [8/9/10 Regression] G++ rejects lambda with constexpr variable Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ostash at ostash dot kiev.ua Target Milestone: --- Hello, Following snippet ---- #include <type_traits> auto f = [](auto value) { constexpr auto i = value; return i; }; void foo() { f(std::integral_constant<std::size_t, 0>{}); } ---- is rejected by G++ starting from 8.1.0. It works on GCC7, GCC6 and Clang.