http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52180
Bug #: 52180 Summary: [DR 1227] [C++11] need to remember whether a return type was specified early or late Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: ja...@gcc.gnu.org template <class T> struct A { using X = typename T::X; }; template <class T> typename T::X f(typename A<T>::X); template <class T> void f(...) {} template <class T> auto g(typename A<T>::X) -> typename T::X; template <class T> void g(...) {} void h() { f<int>(0); // OK, substituting return type causes deduction to fail g<int>(0); // error, substituting parameter type instantiates A<int> }