When can we omit the return type in a C++11 lambda?
Your code is being accepted without any warnings because the original C++11 restriction is considered a defect in the standard, which allows implementations to fix the behavior. See CWG DR975, DR1048 and N3638. 975. Restrictions on return type deduction for lambdas [Moved to DR status at the April, 2013 meeting as part of paper N3638.] … Read more