1 // { dg-do compile { target c++14 } } 2 // { dg-options "" } 3 4 template <class,class> struct Same; 5 template <class T> struct Same<T,T> {}; 6 7 auto f() 8 { 9 if constexpr (sizeof(int)==3) // { dg-warning "constexpr" "" { target c++14_only } } 10 return 42; 11 else 12 return 42L; 13 } 14 15 Same<decltype(f()), long> s; 16