* decl.c (make_typename_type): s/parameters/arguments/.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / sfinae53.C
blob19b00cf0c58368c51926cde51cff28dc9d39f37f
1 // PR c++/59204
2 // { dg-do compile { target c++11 } }
4 template< class T >
5   using void_t = void;
7 template< class T, class = void >
8   struct has_type
9 { constexpr static bool value = false; };
11 template< class T >
12   struct has_type<T, void_t<typename T::type>>
13 { constexpr static bool value = true; };
15 struct yes  { using type = int; };
16 struct no   { };
18 int
19 main( )
21   static_assert(     has_type<yes>::value, "false negative!" );
22   static_assert( not has_type<no >::value, "false positive!" );