* decl.c (make_typename_type): s/parameters/arguments/.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / udlit-sfinae.C
blobe24b79d9f0bfc45116c3d10e9d417296de0cc374
1 // { dg-do run { target c++11 } }
3 #include <cassert>
5 template<bool, typename _Tp = void> struct enable_if { };
6 template<typename _Tp> struct enable_if<true, _Tp> { typedef _Tp type; };
9 template <char... c>
10 constexpr typename enable_if<sizeof...(c) == 2, int>::type operator""_t ()
12   return 2;
15 template <char... c>
16 constexpr typename enable_if<sizeof...(c) == 1, int>::type operator""_t ()
18   return 1;
21 template <char... c>
22 constexpr typename enable_if<sizeof...(c) >= 3, int>::type operator""_t ()
24   return 100;
27 int operator""_t (long double)
29   return 200;
32 int main ()
34   assert (45_t == 2);
35   assert (4_t == 1);
36   assert (100000_t == 100);
37   assert (200.0_t == 200);