1 // RUN: %clang_cc1 -std=c++11 -verify %s
2
3 // From core issue 1227.
4
5 template <class T> struct A { using X = typename T::X; }; // expected-error {{no members}}
6 template <class T> typename T::X f(typename A<T>::X);
f(...)7 template <class T> void f(...) {}
8 template <class T> auto g(typename A<T>::X) -> typename T::X; // expected-note {{here}}
g(...)9 template <class T> void g(...) {}
10
h()11 void h()
12 {
13 f<int>(0); // ok, SFINAE in return type
14 g<int>(0); // not ok, substitution inside A<int> is a hard error // expected-note {{substituting}}
15 }
16