1 // template keyword used as disambiguator for dependent names 2 3 #include <type_traits> 4 5 struct Checks 6 { CheckChecks7 template <typename X> static constexpr bool Check() 8 { 9 return true; 10 } 11 }; 12 13 template<typename A, typename std::enable_if<Checks::template Check<A>(),bool>::type = true> class S 14 { foo()15 template<typename U> void foo(){} 16 }; 17 bar()18template<typename T> void bar() 19 { 20 S<T> s; 21 s.template foo<T>(); 22 } 23 24 // Marker to make sure the parser doesn't bail out before this line. 25 int marker; 26