38
I think the following code is very handy and no harmful:
auto fn = [](bool b = false) -> int // NOT legal in C++11
{
return b ? 1 : 0;
};
Why does C++11 explicitly prohibit default arguments of the lambda expression?
I just wonder the rationales and considerations behind.
I want to know "WHY" rather than "WHAT" the C++11 standard says.