The code below does not compile. The error is on the messy line of the second half of the function. The exact same messy line in the first half compiles. The only difference is that in the second half the enclosing compound statement is a lambda body while in the first half it is just a nested block.Given the nature of the error message (and the newness of the lambda implementation) I would deduce that this is a compiler bug relating to the nesting of the lambdas. I can't see any reason that the line would compile differently inside an outer lambda, as no new names or operators are introduced.class Class {public: template<typename F> void operator<<(const F& func) {}};template<typename R> R& operator-(const char* lhs, R& rhs) { return rhs; }void click(Class& button){}void test(){ { Class b; b << click; "Test" - b << click; "Test"-[&]()->Class& { return *new Class; }() << click; }; [&]() { Class b; b << click; "Test" - b << click; "Test"-[&]()->Class& { return *new Class; }() << click; };}Note that this code seems rather unuseful, but I have of course boilt it down from a more fleshed out example that actually does make sense.
Visual Studio/Silverlight/Tooling version
What category (if any) best represents this feedback?
Steps to reproduce
Product Language
Operating System
Operating System Language
Actual results
Expected results
Please wait...