[PATCH] Local classes in templates (PR9685 fix)
Erik Olofsson
erik.olofsson at hansoft.se
Sun Aug 11 14:20:44 PDT 2013
How would DR1484 interact with function return type deduction. Would this still not require the patch?
template <typename Type>
struct Container {
template <typename InnerType>
auto Test(InnerType Param) {
Type Local;
return Local.LocalFunction(Param);
}
};
template <typename FuncType>
auto Func(FuncType Param) {
auto Lambda = [] (auto ParamInner) {
return FuncType() + ParamInner;
};
return Container<decltype(Lambda)>();
}
int main() {
auto LocalContainer = Func(5);
auto Value = LocalContainer.Test(5.5);
return 0;
}
http://llvm-reviews.chandlerc.com/D1358
More information about the cfe-commits
mailing list