template< typename T > struct type_wrapper { }; typedef char (&yes_tag)[2]; template struct if_c { }; template< typename T > struct has_type { struct gcc_3_2_wknd { template< typename U > static yes_tag test( type_wrapper const volatile* // { dg-message "" } , type_wrapper* = 0 ); }; typedef type_wrapper t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast(0))) == // { dg-message "" } sizeof(yes_tag); }; template struct Get_type { }; struct FT_tag {}; struct RT_tag {}; template struct Get_type >::value >::type> { }; // { dg-message "required" } template struct Get_type >::value >::type> { }; // { dg-message "required" } typedef Get_type::type P; // { dg-message "" }