void foo(bool b) { auto f0 = [&]{ return 5; }; auto f1 = [&]{ int i = 42; return i; }; auto f2 = [&]{ int i = 0; double d = 3.14; if (b) return i; else return d; }; }
Standard input is empty
prog.cpp: In lambda function: prog.cpp:12:20: error: inconsistent types 'double' and 'int' deduced for lambda return type
Standard output is empty