Community
Participate
Working Groups
CDT does not correctly handle specializations of local classes: template <typename T> auto foo() { struct S { T bar(); }; return S{}.bar(); } template <typename> struct Waldo; template <> struct Waldo<int> { typedef int type; }; Waldo<decltype(foo<int>())>::type g(); // Error on 'type'
Note that lambda expressions used inside a function's body generate what are effectively local classes, and while explicilty-defined local classes are rare in real-world code, lambdas are becoming increasingly common.