Skip to content

Commit 4cde945

Browse files
authored
[libc++][NFC] Remove public from the type traits (llvm#135088)
The type traits are always `struct`s, so the `public` isn't necessary. We're currently using `public` in some places, while we omit it in others. This makes us consistent across the type traits.
1 parent cb43fe3 commit 4cde945

36 files changed

+94
-103
lines changed

libcxx/include/__type_traits/is_abstract.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
_LIBCPP_BEGIN_NAMESPACE_STD
2020

2121
template <class _Tp>
22-
struct _LIBCPP_NO_SPECIALIZATIONS is_abstract : public integral_constant<bool, __is_abstract(_Tp)> {};
22+
struct _LIBCPP_NO_SPECIALIZATIONS is_abstract : integral_constant<bool, __is_abstract(_Tp)> {};
2323

2424
#if _LIBCPP_STD_VER >= 17
2525
template <class _Tp>

libcxx/include/__type_traits/is_aggregate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
2121
#if _LIBCPP_STD_VER >= 17
2222

2323
template <class _Tp>
24-
struct _LIBCPP_NO_SPECIALIZATIONS is_aggregate : public integral_constant<bool, __is_aggregate(_Tp)> {};
24+
struct _LIBCPP_NO_SPECIALIZATIONS is_aggregate : integral_constant<bool, __is_aggregate(_Tp)> {};
2525

2626
template <class _Tp>
2727
_LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_aggregate_v = __is_aggregate(_Tp);

libcxx/include/__type_traits/is_arithmetic.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
2222

2323
template <class _Tp>
2424
struct _LIBCPP_NO_SPECIALIZATIONS is_arithmetic
25-
: public integral_constant<bool, is_integral<_Tp>::value || is_floating_point<_Tp>::value> {};
25+
: integral_constant<bool, is_integral<_Tp>::value || is_floating_point<_Tp>::value> {};
2626

2727
#if _LIBCPP_STD_VER >= 17
2828
template <class _Tp>

libcxx/include/__type_traits/is_assignable.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_assignable_v = __is_assignab
3030

3131
template <class _Tp>
3232
struct _LIBCPP_NO_SPECIALIZATIONS is_copy_assignable
33-
: public integral_constant<bool,
34-
__is_assignable(__add_lvalue_reference_t<_Tp>, __add_lvalue_reference_t<const _Tp>)> {};
33+
: integral_constant<bool, __is_assignable(__add_lvalue_reference_t<_Tp>, __add_lvalue_reference_t<const _Tp>)> {};
3534

3635
#if _LIBCPP_STD_VER >= 17
3736
template <class _Tp>
@@ -40,7 +39,7 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_copy_assignable_v = is_copy_
4039

4140
template <class _Tp>
4241
struct _LIBCPP_NO_SPECIALIZATIONS is_move_assignable
43-
: public integral_constant<bool, __is_assignable(__add_lvalue_reference_t<_Tp>, __add_rvalue_reference_t<_Tp>)> {};
42+
: integral_constant<bool, __is_assignable(__add_lvalue_reference_t<_Tp>, __add_rvalue_reference_t<_Tp>)> {};
4443

4544
#if _LIBCPP_STD_VER >= 17
4645
template <class _Tp>

libcxx/include/__type_traits/is_base_of.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
_LIBCPP_BEGIN_NAMESPACE_STD
2020

2121
template <class _Bp, class _Dp>
22-
struct _LIBCPP_NO_SPECIALIZATIONS is_base_of : public integral_constant<bool, __is_base_of(_Bp, _Dp)> {};
22+
struct _LIBCPP_NO_SPECIALIZATIONS is_base_of : integral_constant<bool, __is_base_of(_Bp, _Dp)> {};
2323

2424
#if _LIBCPP_STD_VER >= 17
2525
template <class _Bp, class _Dp>
@@ -30,8 +30,7 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_base_of_v = __is_base_of(_Bp
3030
# if __has_builtin(__builtin_is_virtual_base_of)
3131

3232
template <class _Base, class _Derived>
33-
struct _LIBCPP_NO_SPECIALIZATIONS is_virtual_base_of
34-
: public bool_constant<__builtin_is_virtual_base_of(_Base, _Derived)> {};
33+
struct _LIBCPP_NO_SPECIALIZATIONS is_virtual_base_of : bool_constant<__builtin_is_virtual_base_of(_Base, _Derived)> {};
3534

3635
template <class _Base, class _Derived>
3736
_LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_virtual_base_of_v = __builtin_is_virtual_base_of(_Base, _Derived);

libcxx/include/__type_traits/is_class.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
_LIBCPP_BEGIN_NAMESPACE_STD
2020

2121
template <class _Tp>
22-
struct _LIBCPP_NO_SPECIALIZATIONS is_class : public integral_constant<bool, __is_class(_Tp)> {};
22+
struct _LIBCPP_NO_SPECIALIZATIONS is_class : integral_constant<bool, __is_class(_Tp)> {};
2323

2424
#if _LIBCPP_STD_VER >= 17
2525
template <class _Tp>

libcxx/include/__type_traits/is_constructible.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
_LIBCPP_BEGIN_NAMESPACE_STD
2222

2323
template <class _Tp, class... _Args>
24-
struct _LIBCPP_NO_SPECIALIZATIONS is_constructible : public integral_constant<bool, __is_constructible(_Tp, _Args...)> {
25-
};
24+
struct _LIBCPP_NO_SPECIALIZATIONS is_constructible : integral_constant<bool, __is_constructible(_Tp, _Args...)> {};
2625

2726
#if _LIBCPP_STD_VER >= 17
2827
template <class _Tp, class... _Args>
@@ -31,7 +30,7 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_constructible_v = __is_const
3130

3231
template <class _Tp>
3332
struct _LIBCPP_NO_SPECIALIZATIONS is_copy_constructible
34-
: public integral_constant<bool, __is_constructible(_Tp, __add_lvalue_reference_t<const _Tp>)> {};
33+
: integral_constant<bool, __is_constructible(_Tp, __add_lvalue_reference_t<const _Tp>)> {};
3534

3635
#if _LIBCPP_STD_VER >= 17
3736
template <class _Tp>
@@ -40,15 +39,15 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_copy_constructible_v = is_co
4039

4140
template <class _Tp>
4241
struct _LIBCPP_NO_SPECIALIZATIONS is_move_constructible
43-
: public integral_constant<bool, __is_constructible(_Tp, __add_rvalue_reference_t<_Tp>)> {};
42+
: integral_constant<bool, __is_constructible(_Tp, __add_rvalue_reference_t<_Tp>)> {};
4443

4544
#if _LIBCPP_STD_VER >= 17
4645
template <class _Tp>
4746
_LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_move_constructible_v = is_move_constructible<_Tp>::value;
4847
#endif
4948

5049
template <class _Tp>
51-
struct _LIBCPP_NO_SPECIALIZATIONS is_default_constructible : public integral_constant<bool, __is_constructible(_Tp)> {};
50+
struct _LIBCPP_NO_SPECIALIZATIONS is_default_constructible : integral_constant<bool, __is_constructible(_Tp)> {};
5251

5352
#if _LIBCPP_STD_VER >= 17
5453
template <class _Tp>

libcxx/include/__type_traits/is_convertible.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
_LIBCPP_BEGIN_NAMESPACE_STD
2020

2121
template <class _T1, class _T2>
22-
struct _LIBCPP_NO_SPECIALIZATIONS is_convertible : public integral_constant<bool, __is_convertible(_T1, _T2)> {};
22+
struct _LIBCPP_NO_SPECIALIZATIONS is_convertible : integral_constant<bool, __is_convertible(_T1, _T2)> {};
2323

2424
#if _LIBCPP_STD_VER >= 17
2525
template <class _From, class _To>

libcxx/include/__type_traits/is_core_convertible.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ _LIBCPP_BEGIN_NAMESPACE_STD
2424
// and __is_core_convertible<immovable-type,immovable-type> is true in C++17 and later.
2525

2626
template <class _Tp, class _Up, class = void>
27-
struct __is_core_convertible : public false_type {};
27+
struct __is_core_convertible : false_type {};
2828

2929
template <class _Tp, class _Up>
3030
struct __is_core_convertible<_Tp, _Up, decltype(static_cast<void (*)(_Up)>(0)(static_cast<_Tp (*)()>(0)()))>
31-
: public true_type {};
31+
: true_type {};
3232

3333
_LIBCPP_END_NAMESPACE_STD
3434

libcxx/include/__type_traits/is_destructible.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,28 +62,28 @@ struct __destructible_imp;
6262

6363
template <class _Tp>
6464
struct __destructible_imp<_Tp, false>
65-
: public integral_constant<bool, __is_destructor_wellformed<__remove_all_extents_t<_Tp> >::value> {};
65+
: integral_constant<bool, __is_destructor_wellformed<__remove_all_extents_t<_Tp> >::value> {};
6666

6767
template <class _Tp>
68-
struct __destructible_imp<_Tp, true> : public true_type {};
68+
struct __destructible_imp<_Tp, true> : true_type {};
6969

7070
template <class _Tp, bool>
7171
struct __destructible_false;
7272

7373
template <class _Tp>
74-
struct __destructible_false<_Tp, false> : public __destructible_imp<_Tp, is_reference<_Tp>::value> {};
74+
struct __destructible_false<_Tp, false> : __destructible_imp<_Tp, is_reference<_Tp>::value> {};
7575

7676
template <class _Tp>
77-
struct __destructible_false<_Tp, true> : public false_type {};
77+
struct __destructible_false<_Tp, true> : false_type {};
7878

7979
template <class _Tp>
80-
struct is_destructible : public __destructible_false<_Tp, is_function<_Tp>::value> {};
80+
struct is_destructible : __destructible_false<_Tp, is_function<_Tp>::value> {};
8181

8282
template <class _Tp>
83-
struct is_destructible<_Tp[]> : public false_type {};
83+
struct is_destructible<_Tp[]> : false_type {};
8484

8585
template <>
86-
struct is_destructible<void> : public false_type {};
86+
struct is_destructible<void> : false_type {};
8787

8888
# if _LIBCPP_STD_VER >= 17
8989
template <class _Tp>

libcxx/include/__type_traits/is_empty.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
_LIBCPP_BEGIN_NAMESPACE_STD
2020

2121
template <class _Tp>
22-
struct _LIBCPP_NO_SPECIALIZATIONS is_empty : public integral_constant<bool, __is_empty(_Tp)> {};
22+
struct _LIBCPP_NO_SPECIALIZATIONS is_empty : integral_constant<bool, __is_empty(_Tp)> {};
2323

2424
#if _LIBCPP_STD_VER >= 17
2525
template <class _Tp>

libcxx/include/__type_traits/is_enum.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
_LIBCPP_BEGIN_NAMESPACE_STD
2020

2121
template <class _Tp>
22-
struct _LIBCPP_NO_SPECIALIZATIONS is_enum : public integral_constant<bool, __is_enum(_Tp)> {};
22+
struct _LIBCPP_NO_SPECIALIZATIONS is_enum : integral_constant<bool, __is_enum(_Tp)> {};
2323

2424
#if _LIBCPP_STD_VER >= 17
2525
template <class _Tp>

libcxx/include/__type_traits/is_final.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
_LIBCPP_BEGIN_NAMESPACE_STD
2020

2121
template <class _Tp>
22-
struct __libcpp_is_final : public integral_constant<bool, __is_final(_Tp)> {};
22+
struct __libcpp_is_final : integral_constant<bool, __is_final(_Tp)> {};
2323

2424
#if _LIBCPP_STD_VER >= 14
2525
template <class _Tp>
26-
struct _LIBCPP_NO_SPECIALIZATIONS is_final : public integral_constant<bool, __is_final(_Tp)> {};
26+
struct _LIBCPP_NO_SPECIALIZATIONS is_final : integral_constant<bool, __is_final(_Tp)> {};
2727
#endif
2828

2929
#if _LIBCPP_STD_VER >= 17

libcxx/include/__type_traits/is_floating_point.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@
2020
_LIBCPP_BEGIN_NAMESPACE_STD
2121

2222
// clang-format off
23-
template <class _Tp> struct __libcpp_is_floating_point : public false_type {};
24-
template <> struct __libcpp_is_floating_point<float> : public true_type {};
25-
template <> struct __libcpp_is_floating_point<double> : public true_type {};
26-
template <> struct __libcpp_is_floating_point<long double> : public true_type {};
23+
template <class _Tp> struct __libcpp_is_floating_point : false_type {};
24+
template <> struct __libcpp_is_floating_point<float> : true_type {};
25+
template <> struct __libcpp_is_floating_point<double> : true_type {};
26+
template <> struct __libcpp_is_floating_point<long double> : true_type {};
2727
// clang-format on
2828

2929
template <class _Tp>
30-
struct _LIBCPP_NO_SPECIALIZATIONS is_floating_point : public __libcpp_is_floating_point<__remove_cv_t<_Tp> > {};
30+
struct _LIBCPP_NO_SPECIALIZATIONS is_floating_point : __libcpp_is_floating_point<__remove_cv_t<_Tp> > {};
3131

3232
#if _LIBCPP_STD_VER >= 17
3333
template <class _Tp>

libcxx/include/__type_traits/is_fundamental.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_fundamental_v = __is_fundame
3434

3535
template <class _Tp>
3636
struct is_fundamental
37-
: public integral_constant<bool, is_void<_Tp>::value || __is_null_pointer_v<_Tp> || is_arithmetic<_Tp>::value> {};
37+
: integral_constant<bool, is_void<_Tp>::value || __is_null_pointer_v<_Tp> || is_arithmetic<_Tp>::value> {};
3838

3939
# if _LIBCPP_STD_VER >= 17
4040
template <class _Tp>

libcxx/include/__type_traits/is_implicit_lifetime.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
2222
# if __has_builtin(__builtin_is_implicit_lifetime)
2323

2424
template <class _Tp>
25-
struct _LIBCPP_NO_SPECIALIZATIONS is_implicit_lifetime : public bool_constant<__builtin_is_implicit_lifetime(_Tp)> {};
25+
struct _LIBCPP_NO_SPECIALIZATIONS is_implicit_lifetime : bool_constant<__builtin_is_implicit_lifetime(_Tp)> {};
2626

2727
template <class _Tp>
2828
_LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_implicit_lifetime_v = __builtin_is_implicit_lifetime(_Tp);

libcxx/include/__type_traits/is_literal_type.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
2121
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS)
2222
template <class _Tp>
2323
struct _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_NO_SPECIALIZATIONS is_literal_type
24-
: public integral_constant<bool, __is_literal_type(_Tp)> {};
24+
: integral_constant<bool, __is_literal_type(_Tp)> {};
2525

2626
# if _LIBCPP_STD_VER >= 17
2727
template <class _Tp>

libcxx/include/__type_traits/is_nothrow_assignable.h

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
_LIBCPP_BEGIN_NAMESPACE_STD
2222

2323
template <class _Tp, class _Arg>
24-
struct _LIBCPP_NO_SPECIALIZATIONS is_nothrow_assignable
25-
: public integral_constant<bool, __is_nothrow_assignable(_Tp, _Arg)> {};
24+
struct _LIBCPP_NO_SPECIALIZATIONS is_nothrow_assignable : integral_constant<bool, __is_nothrow_assignable(_Tp, _Arg)> {
25+
};
2626

2727
#if _LIBCPP_STD_VER >= 17
2828
template <class _Tp, class _Arg>
@@ -31,9 +31,8 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_nothrow_assignable_v = __is_
3131

3232
template <class _Tp>
3333
struct _LIBCPP_NO_SPECIALIZATIONS is_nothrow_copy_assignable
34-
: public integral_constant<
35-
bool,
36-
__is_nothrow_assignable(__add_lvalue_reference_t<_Tp>, __add_lvalue_reference_t<const _Tp>)> {};
34+
: integral_constant<bool,
35+
__is_nothrow_assignable(__add_lvalue_reference_t<_Tp>, __add_lvalue_reference_t<const _Tp>)> {};
3736

3837
#if _LIBCPP_STD_VER >= 17
3938
template <class _Tp>
@@ -42,9 +41,7 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_nothrow_copy_assignable_v =
4241

4342
template <class _Tp>
4443
struct _LIBCPP_NO_SPECIALIZATIONS is_nothrow_move_assignable
45-
: public integral_constant<bool,
46-
__is_nothrow_assignable(__add_lvalue_reference_t<_Tp>, __add_rvalue_reference_t<_Tp>)> {
47-
};
44+
: integral_constant<bool, __is_nothrow_assignable(__add_lvalue_reference_t<_Tp>, __add_rvalue_reference_t<_Tp>)> {};
4845

4946
#if _LIBCPP_STD_VER >= 17
5047
template <class _Tp>

libcxx/include/__type_traits/is_nothrow_constructible.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
2222

2323
template < class _Tp, class... _Args>
2424
struct _LIBCPP_NO_SPECIALIZATIONS is_nothrow_constructible
25-
: public integral_constant<bool, __is_nothrow_constructible(_Tp, _Args...)> {};
25+
: integral_constant<bool, __is_nothrow_constructible(_Tp, _Args...)> {};
2626

2727
#if _LIBCPP_STD_VER >= 17
2828
template <class _Tp, class... _Args>
@@ -32,7 +32,7 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_nothrow_constructible_v =
3232

3333
template <class _Tp>
3434
struct _LIBCPP_NO_SPECIALIZATIONS is_nothrow_copy_constructible
35-
: public integral_constant< bool, __is_nothrow_constructible(_Tp, __add_lvalue_reference_t<const _Tp>)> {};
35+
: integral_constant<bool, __is_nothrow_constructible(_Tp, __add_lvalue_reference_t<const _Tp>)> {};
3636

3737
#if _LIBCPP_STD_VER >= 17
3838
template <class _Tp>
@@ -42,7 +42,7 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_nothrow_copy_constructible_v
4242

4343
template <class _Tp>
4444
struct _LIBCPP_NO_SPECIALIZATIONS is_nothrow_move_constructible
45-
: public integral_constant<bool, __is_nothrow_constructible(_Tp, __add_rvalue_reference_t<_Tp>)> {};
45+
: integral_constant<bool, __is_nothrow_constructible(_Tp, __add_rvalue_reference_t<_Tp>)> {};
4646

4747
#if _LIBCPP_STD_VER >= 17
4848
template <class _Tp>
@@ -52,7 +52,7 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_nothrow_move_constructible_v
5252

5353
template <class _Tp>
5454
struct _LIBCPP_NO_SPECIALIZATIONS is_nothrow_default_constructible
55-
: public integral_constant<bool, __is_nothrow_constructible(_Tp)> {};
55+
: integral_constant<bool, __is_nothrow_constructible(_Tp)> {};
5656

5757
#if _LIBCPP_STD_VER >= 17
5858
template <class _Tp>

libcxx/include/__type_traits/is_nothrow_destructible.h

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,23 +32,22 @@ template <bool, class _Tp>
3232
struct __libcpp_is_nothrow_destructible;
3333

3434
template <class _Tp>
35-
struct __libcpp_is_nothrow_destructible<false, _Tp> : public false_type {};
35+
struct __libcpp_is_nothrow_destructible<false, _Tp> : false_type {};
3636

3737
template <class _Tp>
38-
struct __libcpp_is_nothrow_destructible<true, _Tp>
39-
: public integral_constant<bool, noexcept(std::declval<_Tp>().~_Tp()) > {};
38+
struct __libcpp_is_nothrow_destructible<true, _Tp> : integral_constant<bool, noexcept(std::declval<_Tp>().~_Tp()) > {};
4039

4140
template <class _Tp>
42-
struct is_nothrow_destructible : public __libcpp_is_nothrow_destructible<is_destructible<_Tp>::value, _Tp> {};
41+
struct is_nothrow_destructible : __libcpp_is_nothrow_destructible<is_destructible<_Tp>::value, _Tp> {};
4342

4443
template <class _Tp, size_t _Ns>
45-
struct is_nothrow_destructible<_Tp[_Ns]> : public is_nothrow_destructible<_Tp> {};
44+
struct is_nothrow_destructible<_Tp[_Ns]> : is_nothrow_destructible<_Tp> {};
4645

4746
template <class _Tp>
48-
struct is_nothrow_destructible<_Tp&> : public true_type {};
47+
struct is_nothrow_destructible<_Tp&> : true_type {};
4948

5049
template <class _Tp>
51-
struct is_nothrow_destructible<_Tp&&> : public true_type {};
50+
struct is_nothrow_destructible<_Tp&&> : true_type {};
5251

5352
#endif // __has_builtin(__is_nothrow_destructible)
5453

libcxx/include/__type_traits/is_pod.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
_LIBCPP_BEGIN_NAMESPACE_STD
2020

2121
template <class _Tp>
22-
struct _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_NO_SPECIALIZATIONS is_pod : public integral_constant<bool, __is_pod(_Tp)> {};
22+
struct _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_NO_SPECIALIZATIONS is_pod : integral_constant<bool, __is_pod(_Tp)> {};
2323

2424
#if _LIBCPP_STD_VER >= 17
2525
template <class _Tp>

libcxx/include/__type_traits/is_pointer.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_pointer_v = __is_pointer(_Tp
3232
#else // __has_builtin(__is_pointer)
3333

3434
template <class _Tp>
35-
struct __libcpp_is_pointer : public false_type {};
35+
struct __libcpp_is_pointer : false_type {};
3636
template <class _Tp>
37-
struct __libcpp_is_pointer<_Tp*> : public true_type {};
37+
struct __libcpp_is_pointer<_Tp*> : true_type {};
3838

3939
template <class _Tp>
4040
struct __libcpp_remove_objc_qualifiers {
@@ -50,7 +50,7 @@ template <class _Tp> struct __libcpp_remove_objc_qualifiers<_Tp __unsafe_unretai
5050
# endif
5151

5252
template <class _Tp>
53-
struct is_pointer : public __libcpp_is_pointer<typename __libcpp_remove_objc_qualifiers<__remove_cv_t<_Tp> >::type> {};
53+
struct is_pointer : __libcpp_is_pointer<typename __libcpp_remove_objc_qualifiers<__remove_cv_t<_Tp> >::type> {};
5454

5555
# if _LIBCPP_STD_VER >= 17
5656
template <class _Tp>

libcxx/include/__type_traits/is_polymorphic.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
_LIBCPP_BEGIN_NAMESPACE_STD
2020

2121
template <class _Tp>
22-
struct _LIBCPP_NO_SPECIALIZATIONS is_polymorphic : public integral_constant<bool, __is_polymorphic(_Tp)> {};
22+
struct _LIBCPP_NO_SPECIALIZATIONS is_polymorphic : integral_constant<bool, __is_polymorphic(_Tp)> {};
2323

2424
#if _LIBCPP_STD_VER >= 17
2525
template <class _Tp>

0 commit comments

Comments
 (0)