1 // { dg-do compile { target c++11 } } 2 // { dg-prune-output "note:" } 3 4 template<bool, typename _Tp = void> struct enable_if { }; 5 template<typename _Tp> struct enable_if<true, _Tp> { typedef _Tp type; }; 6 7 template <char... c> 8 constexpr typename enable_if<sizeof...(c) == 2, int>::type operator""_t () // { dg-error "no type named|in" } 9 { 10 return 2; 11 } 12 13 template <char... c> 14 constexpr typename enable_if<sizeof...(c) == 1, int>::type operator""_t () // { dg-error "no type named|in" } 15 { 16 return 1; 17 } 18 19 int a = 45_t; 20 int b = 4_t; 21 int c = 100000_t; // { dg-error "no matching function for call to" } 22