@@ -2027,15 +2027,6 @@ template<typename T> struct CrazyDerived : T { };
2027
2027
2028
2028
class class_forward ; // expected-note 2 {{forward declaration of 'class_forward'}}
2029
2029
2030
- template <typename Base, typename Derived>
2031
- void isBaseOfT () {
2032
- static_assert (__is_base_of (Base, Derived), " " );
2033
- };
2034
- template <typename Base, typename Derived>
2035
- void isBaseOfF () {
2036
- static_assert (!__is_base_of (Base, Derived), " " );
2037
- };
2038
-
2039
2030
template <class T > class DerivedTemp : Base {};
2040
2031
template <class T > class NonderivedTemp {};
2041
2032
template <class T > class UndefinedTemp ; // expected-note {{declared here}}
@@ -2079,14 +2070,14 @@ void is_base_of() {
2079
2070
static_assert (!__is_base_of (int , Empty), " " );
2080
2071
static_assert (!__is_base_of (Union, int ), " " );
2081
2072
2082
- isBaseOfT< Base, Derived>( );
2083
- isBaseOfF< Derived, Base>( );
2073
+ static_assert ( __is_base_of ( Base, Derived), " " );
2074
+ static_assert (! __is_base_of ( Derived, Base), " " );
2084
2075
2085
- isBaseOfT< Base, CrazyDerived<Base> >( );
2086
- isBaseOfF< CrazyDerived<Base>, Base>( );
2076
+ static_assert ( __is_base_of ( Base, CrazyDerived<Base>), " " );
2077
+ static_assert (! __is_base_of ( CrazyDerived<Base>, Base), " " );
2087
2078
2088
- isBaseOfT< BaseA<int >, DerivedB<int > >( );
2089
- isBaseOfF< DerivedB<int >, BaseA<int > >( );
2079
+ static_assert ( __is_base_of ( BaseA<int >, DerivedB<int >), " " );
2080
+ static_assert (! __is_base_of ( DerivedB<int >, BaseA<int >), " " );
2090
2081
}
2091
2082
2092
2083
template <class T , class U >
0 commit comments