Lambda returning itself: is this legal?
The program is ill-formed (clang is right) per [dcl.spec.auto]/9: If the name of an entity with an undeduced placeholder type appears in an expression, the program is ill-formed. Once a non-discarded return statement has been seen in a function, however, the return type deduced from that statement can be used in the rest of the … Read more