1 template< typename T > struct type_wrapper {
3 typedef char (&yes_tag)[2];
4 template<bool b> struct if_c {
6 template< typename T > struct has_type {
8 template< typename U > static yes_tag test( type_wrapper<U> const volatile* // { dg-message "" }
9 , type_wrapper<typename U::type>* = 0 );
11 typedef type_wrapper<T> t_;
12 static const bool value = sizeof(gcc_3_2_wknd::test(static_cast<t_*>(0))) == // { dg-message "" }
15 template <class K, class T, class=void> struct Get_type {
19 template <class K> struct Get_type<K, RT_tag, typename if_c<
20 !has_type<Get_type<K, FT_tag> >::value >::type> { }; // { dg-message "required" }
21 template <class K> struct Get_type<K, FT_tag, typename if_c<
22 !has_type<Get_type<K, RT_tag> >::value >::type> { }; // { dg-message "required" }
23 typedef Get_type<int, FT_tag>::type P; // { dg-message "" }