[PATCH] Allow return type deduction for templates in delayed parsing mode.
Reid Kleckner
rnk at google.com
Tue Oct 29 17:20:45 PDT 2013
Are you sure this is an MSVC-compatible change? MSVC allows late specified return types, and does so while delaying the parsing of the body. Consider this test case, which cl accepts and clang -fno-delayed-template-parsing rejects:
extern "C" int puts(const char *s);
template <typename T>
auto foo(T x) -> decltype(x) {
::bar();
return x;
}
void bar() { puts("bar"); }
int main() { return foo(0); }
http://llvm-reviews.chandlerc.com/D2053
More information about the cfe-commits
mailing list