From n3000, 5.1.2/6,
The lambda-expression’s
compound-statement yields the
function-body (8.4) of the function
call operator, but for purposes of
name lookup (3.4), … the
compound-statement is considered in
the context of the lambda-expression.
Not surprisingly, the local type should be visible.