struct Test { static const int value = []() -> int { return 0; } (); };
With gcc-4.6, I get something like error: function needs to be constexpr . I tried several combinations of placing constexpr in different places, but no luck.
Is constexpr for lambda functions (no matter what type of return is specified or not)? What is the correct syntax?
Any job possible?
c ++ lambda c ++ 11 constexpr
iammilind Jun 21 2018-11-11T00: 00Z
source share