1// PR c++/59204
2// { dg-do compile { target c++11 } }
3
4template< class T >
5  using void_t = void;
6
7template< class T, class = void >
8  struct has_type
9{ constexpr static bool value = false; };
10
11template< class T >
12  struct has_type<T, void_t<typename T::type>>
13{ constexpr static bool value = true; };
14
15struct yes  { using type = int; };
16struct no   { };
17
18int
19main( )
20{
21  static_assert(     has_type<yes>::value, "false negative!" );
22  static_assert( not has_type<no >::value, "false positive!" );
23}
24