@@ -3049,135 +3049,10 @@ struct __member_pointer_class_type<_Ret _ClassType::*> {
3049
3049
3050
3050
// template <class T, class... Args> struct is_constructible;
3051
3051
3052
- #if defined(_LIBCPP_COMPILER_GCC) && _GNUC_VER_NEW >= 10000
3053
- # define _LIBCPP_GCC_SUPPORTS_IS_CONSTRUCTIBLE
3054
- #endif
3055
-
3056
- #if !defined(_LIBCPP_CXX03_LANG) && !__has_feature(is_constructible) && !defined(_LIBCPP_GCC_SUPPORTS_IS_CONSTRUCTIBLE)
3057
-
3058
- template <class _Tp , class ... _Args>
3059
- struct __libcpp_is_constructible ;
3060
-
3061
- template <class _To , class _From >
3062
- struct __is_invalid_base_to_derived_cast {
3063
- static_assert (is_reference<_To>::value, " Wrong specialization" );
3064
- using _RawFrom = __uncvref_t <_From>;
3065
- using _RawTo = __uncvref_t <_To>;
3066
- static const bool value = _And<
3067
- _IsNotSame<_RawFrom, _RawTo>,
3068
- is_base_of<_RawFrom, _RawTo>,
3069
- _Not<__libcpp_is_constructible<_RawTo, _From>>
3070
- >::value;
3071
- };
3072
-
3073
- template <class _To , class _From >
3074
- struct __is_invalid_lvalue_to_rvalue_cast : false_type {
3075
- static_assert (is_reference<_To>::value, " Wrong specialization" );
3076
- };
3077
-
3078
- template <class _ToRef , class _FromRef >
3079
- struct __is_invalid_lvalue_to_rvalue_cast <_ToRef&&, _FromRef&> {
3080
- using _RawFrom = __uncvref_t <_FromRef>;
3081
- using _RawTo = __uncvref_t <_ToRef>;
3082
- static const bool value = _And<
3083
- _Not<is_function<_RawTo>>,
3084
- _Or<
3085
- _IsSame<_RawFrom, _RawTo>,
3086
- is_base_of<_RawTo, _RawFrom>>
3087
- >::value;
3088
- };
3089
-
3090
- struct __is_constructible_helper
3091
- {
3092
- template <class _To >
3093
- static void __eat (_To);
3094
-
3095
- // This overload is needed to work around a Clang bug that disallows
3096
- // static_cast<T&&>(e) for non-reference-compatible types.
3097
- // Example: static_cast<int&&>(declval<double>());
3098
- // NOTE: The static_cast implementation below is required to support
3099
- // classes with explicit conversion operators.
3100
- template <class _To , class _From ,
3101
- class = decltype (__eat<_To>(declval<_From>()))>
3102
- static true_type __test_cast (int );
3103
-
3104
- template <class _To , class _From ,
3105
- class = decltype (static_cast <_To>(declval<_From>()))>
3106
- static integral_constant<bool ,
3107
- !__is_invalid_base_to_derived_cast<_To, _From>::value &&
3108
- !__is_invalid_lvalue_to_rvalue_cast<_To, _From>::value
3109
- > __test_cast (long );
3110
-
3111
- template <class , class >
3112
- static false_type __test_cast (...);
3113
-
3114
- template <class _Tp , class ..._Args,
3115
- class = decltype (_Tp(declval<_Args>()...))>
3116
- static true_type __test_nary (int );
3117
- template <class _Tp , class ...>
3118
- static false_type __test_nary (...);
3119
-
3120
- template <class _Tp , class _A0 , class = decltype (::new _Tp(declval<_A0>()))>
3121
- static is_destructible<_Tp> __test_unary (int );
3122
- template <class , class >
3123
- static false_type __test_unary (...);
3124
- };
3125
-
3126
- template <class _Tp , bool = is_void<_Tp>::value>
3127
- struct __is_default_constructible
3128
- : decltype (__is_constructible_helper::__test_nary<_Tp>(0 ))
3129
- {};
3130
-
3131
- template <class _Tp >
3132
- struct __is_default_constructible <_Tp, true > : false_type {};
3133
-
3134
- template <class _Tp >
3135
- struct __is_default_constructible <_Tp[], false > : false_type {};
3136
-
3137
- template <class _Tp , size_t _Nx>
3138
- struct __is_default_constructible <_Tp[_Nx], false >
3139
- : __is_default_constructible<typename remove_all_extents<_Tp>::type> {};
3140
-
3141
- template <class _Tp , class ... _Args>
3142
- struct __libcpp_is_constructible
3143
- {
3144
- static_assert (sizeof ...(_Args) > 1 , " Wrong specialization" );
3145
- typedef decltype (__is_constructible_helper::__test_nary<_Tp, _Args...>(0 ))
3146
- type;
3147
- };
3148
-
3149
- template <class _Tp >
3150
- struct __libcpp_is_constructible <_Tp> : __is_default_constructible<_Tp> {};
3151
-
3152
- template <class _Tp , class _A0 >
3153
- struct __libcpp_is_constructible <_Tp, _A0>
3154
- : public decltype (__is_constructible_helper::__test_unary<_Tp, _A0>(0 ))
3155
- {};
3156
-
3157
- template <class _Tp , class _A0 >
3158
- struct __libcpp_is_constructible <_Tp&, _A0>
3159
- : public decltype (__is_constructible_helper::
3160
- __test_cast<_Tp&, _A0>(0 ))
3161
- {};
3162
-
3163
- template <class _Tp , class _A0 >
3164
- struct __libcpp_is_constructible <_Tp&&, _A0>
3165
- : public decltype (__is_constructible_helper::
3166
- __test_cast<_Tp&&, _A0>(0 ))
3167
- {};
3168
-
3169
- #endif
3170
-
3171
- #if __has_feature(is_constructible) || defined(_LIBCPP_GCC_SUPPORTS_IS_CONSTRUCTIBLE)
3172
3052
template <class _Tp , class ..._Args>
3173
3053
struct _LIBCPP_TEMPLATE_VIS is_constructible
3174
3054
: public integral_constant<bool , __is_constructible(_Tp, _Args...)>
3175
- {};
3176
- #else
3177
- template <class _Tp , class ... _Args>
3178
- struct _LIBCPP_TEMPLATE_VIS is_constructible
3179
- : public __libcpp_is_constructible<_Tp, _Args...>::type {};
3180
- #endif
3055
+ { };
3181
3056
3182
3057
#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
3183
3058
template <class _Tp , class ..._Args>
@@ -3250,53 +3125,12 @@ _LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_move_constructible_v
3250
3125
3251
3126
// is_trivially_constructible
3252
3127
3253
- #if __has_feature(is_trivially_constructible) || _GNUC_VER >= 501
3254
-
3255
3128
template <class _Tp , class ... _Args>
3256
3129
struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible
3257
3130
: integral_constant<bool , __is_trivially_constructible(_Tp, _Args...)>
3258
3131
{
3259
3132
};
3260
3133
3261
- #else // !__has_feature(is_trivially_constructible)
3262
-
3263
- template <class _Tp , class ... _Args>
3264
- struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible
3265
- : false_type
3266
- {
3267
- };
3268
-
3269
- template <class _Tp >
3270
- struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible<_Tp>
3271
- #if __has_feature(has_trivial_constructor) || defined(_LIBCPP_COMPILER_GCC)
3272
- : integral_constant<bool , __has_trivial_constructor(_Tp)>
3273
- #else
3274
- : integral_constant<bool , is_scalar<_Tp>::value>
3275
- #endif
3276
- {
3277
- };
3278
-
3279
- template <class _Tp >
3280
- struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible<_Tp, _Tp&&>
3281
- : integral_constant<bool , is_scalar<_Tp>::value>
3282
- {
3283
- };
3284
-
3285
- template <class _Tp >
3286
- struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible<_Tp, const _Tp&>
3287
- : integral_constant<bool , is_scalar<_Tp>::value>
3288
- {
3289
- };
3290
-
3291
- template <class _Tp >
3292
- struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible<_Tp, _Tp&>
3293
- : integral_constant<bool , is_scalar<_Tp>::value>
3294
- {
3295
- };
3296
-
3297
- #endif // !__has_feature(is_trivially_constructible)
3298
-
3299
-
3300
3134
#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
3301
3135
template <class _Tp , class ... _Args>
3302
3136
_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_trivially_constructible_v
@@ -3341,37 +3175,10 @@ _LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_trivially_move_constructible_v
3341
3175
3342
3176
// is_trivially_assignable
3343
3177
3344
- #if __has_feature(is_trivially_assignable) || _GNUC_VER >= 501
3345
-
3346
3178
template <class _Tp , class _Arg >
3347
3179
struct is_trivially_assignable
3348
3180
: integral_constant<bool , __is_trivially_assignable(_Tp, _Arg)>
3349
- {
3350
- };
3351
-
3352
- #else // !__has_feature(is_trivially_assignable)
3353
-
3354
- template <class _Tp , class _Arg >
3355
- struct is_trivially_assignable
3356
- : public false_type {};
3357
-
3358
- template <class _Tp >
3359
- struct is_trivially_assignable <_Tp&, _Tp>
3360
- : integral_constant<bool , is_scalar<_Tp>::value> {};
3361
-
3362
- template <class _Tp >
3363
- struct is_trivially_assignable <_Tp&, _Tp&>
3364
- : integral_constant<bool , is_scalar<_Tp>::value> {};
3365
-
3366
- template <class _Tp >
3367
- struct is_trivially_assignable <_Tp&, const _Tp&>
3368
- : integral_constant<bool , is_scalar<_Tp>::value> {};
3369
-
3370
- template <class _Tp >
3371
- struct is_trivially_assignable <_Tp&, _Tp&&>
3372
- : integral_constant<bool , is_scalar<_Tp>::value> {};
3373
-
3374
- #endif // !__has_feature(is_trivially_assignable)
3181
+ { };
3375
3182
3376
3183
#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
3377
3184
template <class _Tp , class _Arg >
0 commit comments