1 // PR c++/55127 2 3 struct some_class 4 { 5 static const bool is_valid_type = true; 6 }; 7 8 template< typename Type 9 , bool Valid = Type::is_valid_type 10 > 11 struct wrapper; 12 13 template< typename Type > 14 struct wrapper< Type, true > 15 { 16 typedef Type type; 17 }; 18 19 template< typename T > 20 void fun() 21 { 22 wrapper<some_class>::type x; 23 } 24 25 int main() 26 { 27 fun<int>(); 28 } 29