brintos

brintos / llvm-project-archived public Read only

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