-
-
Notifications
You must be signed in to change notification settings - Fork 37
Closed
Description
You shouldn't expect this to compile, for several reasons, but it does.
https://compiler-explorer.com/z/sb1648Wrr
constexpr auto make_val() {
return 10;
}
int main()
{
const auto x = 42;
const auto y = [](){ return 43; }();
const auto result = [](){
return x + y + make_val();
}();
static_assert(result == 95);
}LB-- and bnjmntylrLB--