http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56039



--- Comment #7 from Hubert Tong <hstong at ca dot ibm.com> 2013-01-20 16:45:13 
UTC ---

(In reply to comment #6)

> I wonder why you think this would belong to the "immediate context". Actually

> it seems to me as if the instantiation of the body of a lambda expression is

> similarly non-immediate as the instantiation of a class template.



The body of a closure under N3290, forms a unique, singular "instance" which

lexically eminates from the source location where the lambda expression occurs

(by definition) and cannot be "instantiated" except by the presence of the

lambda expression itself.



That is, whether the "body" of the lambda expression is valid or not valid

is not affected by unknowns such as what types it would be instantiated with or

what names would be found if the lookup was moved to a different context.

Reply via email to