15179
15179
using add_pointer_t = typename add_pointer<T>::type;
15180
15180
15181
15181
// \ref{meta.trans.other}, other transformations
15182
- template <size_t Len,
15183
- size_t Align = @\textit{default-alignment}@> // see \ref{meta.trans.other}
15182
+ template <size_t Len, size_t Align = @\textit{default-alignment}@> // see \ref{meta.trans.other}
15184
15183
struct aligned_storage;
15185
15184
template <size_t Len, class... Types> struct aligned_union;
15186
15185
template <class T> struct decay;
15190
15189
template <class T> struct underlying_type;
15191
15190
template <class Fn, class... ArgTypes> struct invoke_result;
15192
15191
15193
- template <size_t Len,
15194
- size_t Align = @\textit{default-alignment}@> // see \ref{meta.trans.other}
15192
+ template <size_t Len, size_t Align = @\textit{default-alignment}@> // see \ref{meta.trans.other}
15195
15193
using aligned_storage_t = typename aligned_storage<Len, Align>::type;
15196
15194
template <size_t Len, class... Types>
15197
15195
using aligned_union_t = typename aligned_union<Len, Types...>::type;
@@ -15223,167 +15221,182 @@
15223
15221
};
15224
15222
15225
15223
// \ref{meta.unary.cat}, primary type categories
15226
- template <class T> inline constexpr bool is_void_v
15227
- = is_void<T>::value;
15228
- template <class T> inline constexpr bool is_null_pointer_v
15229
- = is_null_pointer<T>::value;
15230
- template <class T> inline constexpr bool is_integral_v
15231
- = is_integral<T>::value;
15232
- template <class T> inline constexpr bool is_floating_point_v
15233
- = is_floating_point<T>::value;
15234
- template <class T> inline constexpr bool is_array_v
15235
- = is_array<T>::value;
15236
- template <class T> inline constexpr bool is_pointer_v
15237
- = is_pointer<T>::value;
15238
- template <class T> inline constexpr bool is_lvalue_reference_v
15239
- = is_lvalue_reference<T>::value;
15240
- template <class T> inline constexpr bool is_rvalue_reference_v
15241
- = is_rvalue_reference<T>::value;
15242
- template <class T> inline constexpr bool is_member_object_pointer_v
15243
- = is_member_object_pointer<T>::value;
15244
- template <class T> inline constexpr bool is_member_function_pointer_v
15245
- = is_member_function_pointer<T>::value;
15246
- template <class T> inline constexpr bool is_enum_v
15247
- = is_enum<T>::value;
15248
- template <class T> inline constexpr bool is_union_v
15249
- = is_union<T>::value;
15250
- template <class T> inline constexpr bool is_class_v
15251
- = is_class<T>::value;
15252
- template <class T> inline constexpr bool is_function_v
15253
- = is_function<T>::value;
15224
+ template <class T>
15225
+ inline constexpr bool is_void_v = is_void<T>::value;
15226
+ template <class T>
15227
+ inline constexpr bool is_null_pointer_v = is_null_pointer<T>::value;
15228
+ template <class T>
15229
+ inline constexpr bool is_integral_v = is_integral<T>::value;
15230
+ template <class T>
15231
+ inline constexpr bool is_floating_point_v = is_floating_point<T>::value;
15232
+ template <class T>
15233
+ inline constexpr bool is_array_v = is_array<T>::value;
15234
+ template <class T>
15235
+ inline constexpr bool is_pointer_v = is_pointer<T>::value;
15236
+ template <class T>
15237
+ inline constexpr bool is_lvalue_reference_v = is_lvalue_reference<T>::value;
15238
+ template <class T>
15239
+ inline constexpr bool is_rvalue_reference_v = is_rvalue_reference<T>::value;
15240
+ template <class T>
15241
+ inline constexpr bool is_member_object_pointer_v = is_member_object_pointer<T>::value;
15242
+ template <class T>
15243
+ inline constexpr bool is_member_function_pointer_v = is_member_function_pointer<T>::value;
15244
+ template <class T>
15245
+ inline constexpr bool is_enum_v = is_enum<T>::value;
15246
+ template <class T>
15247
+ inline constexpr bool is_union_v = is_union<T>::value;
15248
+ template <class T>
15249
+ inline constexpr bool is_class_v = is_class<T>::value;
15250
+ template <class T>
15251
+ inline constexpr bool is_function_v = is_function<T>::value;
15254
15252
15255
15253
// \ref{meta.unary.comp}, composite type categories
15256
- template <class T> inline constexpr bool is_reference_v
15257
- = is_reference<T>::value;
15258
- template <class T> inline constexpr bool is_arithmetic_v
15259
- = is_arithmetic<T>::value;
15260
- template <class T> inline constexpr bool is_fundamental_v
15261
- = is_fundamental<T>::value;
15262
- template <class T> inline constexpr bool is_object_v
15263
- = is_object<T>::value;
15264
- template <class T> inline constexpr bool is_scalar_v
15265
- = is_scalar<T>::value;
15266
- template <class T> inline constexpr bool is_compound_v
15267
- = is_compound<T>::value;
15268
- template <class T> inline constexpr bool is_member_pointer_v
15269
- = is_member_pointer<T>::value;
15254
+ template <class T>
15255
+ inline constexpr bool is_reference_v = is_reference<T>::value;
15256
+ template <class T>
15257
+ inline constexpr bool is_arithmetic_v = is_arithmetic<T>::value;
15258
+ template <class T>
15259
+ inline constexpr bool is_fundamental_v = is_fundamental<T>::value;
15260
+ template <class T>
15261
+ inline constexpr bool is_object_v = is_object<T>::value;
15262
+ template <class T>
15263
+ inline constexpr bool is_scalar_v = is_scalar<T>::value;
15264
+ template <class T>
15265
+ inline constexpr bool is_compound_v = is_compound<T>::value;
15266
+ template <class T>
15267
+ inline constexpr bool is_member_pointer_v = is_member_pointer<T>::value;
15270
15268
15271
15269
// \ref{meta.unary.prop}, type properties
15272
- template <class T> inline constexpr bool is_const_v
15273
- = is_const<T>::value;
15274
- template <class T> inline constexpr bool is_volatile_v
15275
- = is_volatile<T>::value;
15276
- template <class T> inline constexpr bool is_trivial_v
15277
- = is_trivial<T>::value;
15278
- template <class T> inline constexpr bool is_trivially_copyable_v
15279
- = is_trivially_copyable<T>::value;
15280
- template <class T> inline constexpr bool is_standard_layout_v
15281
- = is_standard_layout<T>::value;
15282
- template <class T> inline constexpr bool is_pod_v
15283
- = is_pod<T>::value;
15284
- template <class T> inline constexpr bool is_empty_v
15285
- = is_empty<T>::value;
15286
- template <class T> inline constexpr bool is_polymorphic_v
15287
- = is_polymorphic<T>::value;
15288
- template <class T> inline constexpr bool is_abstract_v
15289
- = is_abstract<T>::value;
15290
- template <class T> inline constexpr bool is_final_v
15291
- = is_final<T>::value;
15292
- template <class T> inline constexpr bool is_aggregate_v
15293
- = is_aggregate<T>::value;
15294
- template <class T> inline constexpr bool is_signed_v
15295
- = is_signed<T>::value;
15296
- template <class T> inline constexpr bool is_unsigned_v
15297
- = is_unsigned<T>::value;
15298
- template <class T, class... Args> inline constexpr bool is_constructible_v
15299
- = is_constructible<T, Args...>::value;
15300
- template <class T> inline constexpr bool is_default_constructible_v
15301
- = is_default_constructible<T>::value;
15302
- template <class T> inline constexpr bool is_copy_constructible_v
15303
- = is_copy_constructible<T>::value;
15304
- template <class T> inline constexpr bool is_move_constructible_v
15305
- = is_move_constructible<T>::value;
15306
- template <class T, class U> inline constexpr bool is_assignable_v
15307
- = is_assignable<T, U>::value;
15308
- template <class T> inline constexpr bool is_copy_assignable_v
15309
- = is_copy_assignable<T>::value;
15310
- template <class T> inline constexpr bool is_move_assignable_v
15311
- = is_move_assignable<T>::value;
15312
- template <class T, class U> inline constexpr bool is_swappable_with_v
15313
- = is_swappable_with<T, U>::value;
15314
- template <class T> inline constexpr bool is_swappable_v
15315
- = is_swappable<T>::value;
15316
- template <class T> inline constexpr bool is_destructible_v
15317
- = is_destructible<T>::value;
15318
- template <class T, class... Args> inline constexpr bool is_trivially_constructible_v
15319
- = is_trivially_constructible<T, Args...>::value;
15320
- template <class T> inline constexpr bool is_trivially_default_constructible_v
15321
- = is_trivially_default_constructible<T>::value;
15322
- template <class T> inline constexpr bool is_trivially_copy_constructible_v
15323
- = is_trivially_copy_constructible<T>::value;
15324
- template <class T> inline constexpr bool is_trivially_move_constructible_v
15325
- = is_trivially_move_constructible<T>::value;
15326
- template <class T, class U> inline constexpr bool is_trivially_assignable_v
15327
- = is_trivially_assignable<T, U>::value;
15328
- template <class T> inline constexpr bool is_trivially_copy_assignable_v
15329
- = is_trivially_copy_assignable<T>::value;
15330
- template <class T> inline constexpr bool is_trivially_move_assignable_v
15331
- = is_trivially_move_assignable<T>::value;
15332
- template <class T> inline constexpr bool is_trivially_destructible_v
15333
- = is_trivially_destructible<T>::value;
15334
- template <class T, class... Args> inline constexpr bool is_nothrow_constructible_v
15335
- = is_nothrow_constructible<T, Args...>::value;
15336
- template <class T> inline constexpr bool is_nothrow_default_constructible_v
15337
- = is_nothrow_default_constructible<T>::value;
15338
- template <class T> inline constexpr bool is_nothrow_copy_constructible_v
15270
+ template <class T>
15271
+ inline constexpr bool is_const_v = is_const<T>::value;
15272
+ template <class T>
15273
+ inline constexpr bool is_volatile_v = is_volatile<T>::value;
15274
+ template <class T>
15275
+ inline constexpr bool is_trivial_v = is_trivial<T>::value;
15276
+ template <class T>
15277
+ inline constexpr bool is_trivially_copyable_v = is_trivially_copyable<T>::value;
15278
+ template <class T>
15279
+ inline constexpr bool is_standard_layout_v = is_standard_layout<T>::value;
15280
+ template <class T>
15281
+ inline constexpr bool is_pod_v = is_pod<T>::value;
15282
+ template <class T>
15283
+ inline constexpr bool is_empty_v = is_empty<T>::value;
15284
+ template <class T>
15285
+ inline constexpr bool is_polymorphic_v = is_polymorphic<T>::value;
15286
+ template <class T>
15287
+ inline constexpr bool is_abstract_v = is_abstract<T>::value;
15288
+ template <class T>
15289
+ inline constexpr bool is_final_v = is_final<T>::value;
15290
+ template <class T>
15291
+ inline constexpr bool is_aggregate_v = is_aggregate<T>::value;
15292
+ template <class T>
15293
+ inline constexpr bool is_signed_v = is_signed<T>::value;
15294
+ template <class T>
15295
+ inline constexpr bool is_unsigned_v = is_unsigned<T>::value;
15296
+ template <class T, class... Args>
15297
+ inline constexpr bool is_constructible_v = is_constructible<T, Args...>::value;
15298
+ template <class T>
15299
+ inline constexpr bool is_default_constructible_v = is_default_constructible<T>::value;
15300
+ template <class T>
15301
+ inline constexpr bool is_copy_constructible_v = is_copy_constructible<T>::value;
15302
+ template <class T>
15303
+ inline constexpr bool is_move_constructible_v = is_move_constructible<T>::value;
15304
+ template <class T, class U>
15305
+ inline constexpr bool is_assignable_v = is_assignable<T, U>::value;
15306
+ template <class T>
15307
+ inline constexpr bool is_copy_assignable_v = is_copy_assignable<T>::value;
15308
+ template <class T>
15309
+ inline constexpr bool is_move_assignable_v = is_move_assignable<T>::value;
15310
+ template <class T, class U>
15311
+ inline constexpr bool is_swappable_with_v = is_swappable_with<T, U>::value;
15312
+ template <class T>
15313
+ inline constexpr bool is_swappable_v = is_swappable<T>::value;
15314
+ template <class T>
15315
+ inline constexpr bool is_destructible_v = is_destructible<T>::value;
15316
+ template <class T, class... Args>
15317
+ inline constexpr bool is_trivially_constructible_v
15318
+ = is_trivially_constructible<T, Args...>::value;
15319
+ template <class T>
15320
+ inline constexpr bool is_trivially_default_constructible_v
15321
+ = is_trivially_default_constructible<T>::value;
15322
+ template <class T>
15323
+ inline constexpr bool is_trivially_copy_constructible_v
15324
+ = is_trivially_copy_constructible<T>::value;
15325
+ template <class T>
15326
+ inline constexpr bool is_trivially_move_constructible_v
15327
+ = is_trivially_move_constructible<T>::value;
15328
+ template <class T, class U>
15329
+ inline constexpr bool is_trivially_assignable_v = is_trivially_assignable<T, U>::value;
15330
+ template <class T>
15331
+ inline constexpr bool is_trivially_copy_assignable_v
15332
+ = is_trivially_copy_assignable<T>::value;
15333
+ template <class T>
15334
+ inline constexpr bool is_trivially_move_assignable_v
15335
+ = is_trivially_move_assignable<T>::value;
15336
+ template <class T>
15337
+ inline constexpr bool is_trivially_destructible_v = is_trivially_destructible<T>::value;
15338
+ template <class T, class... Args>
15339
+ inline constexpr bool is_nothrow_constructible_v
15340
+ = is_nothrow_constructible<T, Args...>::value;
15341
+ template <class T>
15342
+ inline constexpr bool is_nothrow_default_constructible_v
15343
+ = is_nothrow_default_constructible<T>::value;
15344
+ template <class T>
15345
+ inline constexpr bool is_nothrow_copy_constructible_v
15339
15346
= is_nothrow_copy_constructible<T>::value;
15340
- template <class T> inline constexpr bool is_nothrow_move_constructible_v
15341
- = is_nothrow_move_constructible<T>::value;
15342
- template <class T, class U> inline constexpr bool is_nothrow_assignable_v
15343
- = is_nothrow_assignable<T, U>::value;
15344
- template <class T> inline constexpr bool is_nothrow_copy_assignable_v
15345
- = is_nothrow_copy_assignable<T>::value;
15346
- template <class T> inline constexpr bool is_nothrow_move_assignable_v
15347
- = is_nothrow_move_assignable<T>::value;
15348
- template <class T, class U> inline constexpr bool is_nothrow_swappable_with_v
15349
- = is_nothrow_swappable_with<T, U>::value;
15350
- template <class T> inline constexpr bool is_nothrow_swappable_v
15351
- = is_nothrow_swappable<T>::value;
15352
- template <class T> inline constexpr bool is_nothrow_destructible_v
15353
- = is_nothrow_destructible<T>::value;
15354
- template <class T> inline constexpr bool has_virtual_destructor_v
15355
- = has_virtual_destructor<T>::value;
15356
- template <class T> inline constexpr bool has_unique_object_representations_v
15357
- = has_unique_object_representations<T>::value;
15347
+ template <class T>
15348
+ inline constexpr bool is_nothrow_move_constructible_v
15349
+ = is_nothrow_move_constructible<T>::value;
15350
+ template <class T, class U>
15351
+ inline constexpr bool is_nothrow_assignable_v = is_nothrow_assignable<T, U>::value;
15352
+ template <class T>
15353
+ inline constexpr bool is_nothrow_copy_assignable_v = is_nothrow_copy_assignable<T>::value;
15354
+ template <class T>
15355
+ inline constexpr bool is_nothrow_move_assignable_v = is_nothrow_move_assignable<T>::value;
15356
+ template <class T, class U>
15357
+ inline constexpr bool is_nothrow_swappable_with_v = is_nothrow_swappable_with<T, U>::value;
15358
+ template <class T>
15359
+ inline constexpr bool is_nothrow_swappable_v = is_nothrow_swappable<T>::value;
15360
+ template <class T>
15361
+ inline constexpr bool is_nothrow_destructible_v = is_nothrow_destructible<T>::value;
15362
+ template <class T>
15363
+ inline constexpr bool has_virtual_destructor_v = has_virtual_destructor<T>::value;
15364
+ template <class T>
15365
+ inline constexpr bool has_unique_object_representations_v
15366
+ = has_unique_object_representations<T>::value;
15358
15367
15359
15368
// \ref{meta.unary.prop.query}, type property queries
15360
- template <class T> inline constexpr size_t alignment_of_v
15361
- = alignment_of<T>::value;
15362
- template <class T> inline constexpr size_t rank_v
15363
- = rank<T>::value;
15364
- template <class T, unsigned I = 0> inline constexpr size_t extent_v
15365
- = extent<T, I>::value;
15369
+ template <class T>
15370
+ inline constexpr size_t alignment_of_v = alignment_of<T>::value;
15371
+ template <class T>
15372
+ inline constexpr size_t rank_v = rank<T>::value;
15373
+ template <class T, unsigned I = 0>
15374
+ inline constexpr size_t extent_v = extent<T, I>::value;
15366
15375
15367
15376
// \ref{meta.rel}, type relations
15368
- template <class T, class U> inline constexpr bool is_same_v
15369
- = is_same<T, U>::value;
15370
- template <class Base, class Derived> inline constexpr bool is_base_of_v
15371
- = is_base_of<Base, Derived>::value;
15372
- template <class From, class To> inline constexpr bool is_convertible_v
15373
- = is_convertible<From, To>::value;
15374
- template <class Fn, class... ArgTypes> inline constexpr bool is_invocable_v
15375
- = is_invocable<Fn, ArgTypes...>::value;
15376
- template <class R, class Fn, class... ArgTypes> inline constexpr bool is_invocable_r_v
15377
- = is_invocable_r<R, Fn, ArgTypes...>::value;
15378
- template <class Fn, class... ArgTypes> inline constexpr bool is_nothrow_invocable_v
15379
- = is_nothrow_invocable<Fn, ArgTypes...>::value;
15380
- template <class R, class Fn, class... ArgTypes> inline constexpr bool is_nothrow_invocable_r_v
15381
- = is_nothrow_invocable_r<R, Fn, ArgTypes...>::value;
15377
+ template <class T, class U>
15378
+ inline constexpr bool is_same_v = is_same<T, U>::value;
15379
+ template <class Base, class Derived>
15380
+ inline constexpr bool is_base_of_v = is_base_of<Base, Derived>::value;
15381
+ template <class From, class To>
15382
+ inline constexpr bool is_convertible_v = is_convertible<From, To>::value;
15383
+ template <class Fn, class... ArgTypes>
15384
+ inline constexpr bool is_invocable_v = is_invocable<Fn, ArgTypes...>::value;
15385
+ template <class R, class Fn, class... ArgTypes>
15386
+ inline constexpr bool is_invocable_r_v = is_invocable_r<R, Fn, ArgTypes...>::value;
15387
+ template <class Fn, class... ArgTypes>
15388
+ inline constexpr bool is_nothrow_invocable_v = is_nothrow_invocable<Fn, ArgTypes...>::value;
15389
+ template <class R, class Fn, class... ArgTypes>
15390
+ inline constexpr bool is_nothrow_invocable_r_v
15391
+ = is_nothrow_invocable_r<R, Fn, ArgTypes...>::value;
15382
15392
15383
15393
// \ref{meta.logical}, logical operator traits
15384
- template<class... B> inline constexpr bool conjunction_v = conjunction<B...>::value;
15385
- template<class... B> inline constexpr bool disjunction_v = disjunction<B...>::value;
15386
- template<class B> inline constexpr bool negation_v = negation<B>::value;
15394
+ template<class... B>
15395
+ inline constexpr bool conjunction_v = conjunction<B...>::value;
15396
+ template<class... B>
15397
+ inline constexpr bool disjunction_v = disjunction<B...>::value;
15398
+ template<class B>
15399
+ inline constexpr bool negation_v = negation<B>::value;
15387
15400
}
15388
15401
\end{codeblock}
15389
15402
@@ -15399,11 +15412,12 @@
15399
15412
15400
15413
\begin{codeblock}
15401
15414
namespace std {
15402
- template <class T, T v>
15403
- struct integral_constant {
15415
+ template <class T, T v> struct integral_constant {
15404
15416
static constexpr T value = v;
15417
+
15405
15418
using value_type = T;
15406
- using type = integral_constant<T, v>;
15419
+ using type = integral_constant<T, v>;
15420
+
15407
15421
constexpr operator value_type() const noexcept { return value; }
15408
15422
constexpr value_type operator()() const noexcept { return value; }
15409
15423
};
@@ -15990,11 +16004,11 @@
15990
16004
\pnum
15991
16005
\begin{example}
15992
16006
\begin{codeblock}
15993
- is_const_v<const volatile int> // \tcode{true}
15994
- is_const_v<const int*> // \tcode{false}
15995
- is_const_v<const int&> // \tcode{false}
15996
- is_const_v<int[3]> // \tcode{false}
15997
- is_const_v<const int[3]> // \tcode{true}
16007
+ is_const_v<const volatile int> // \tcode{true}
16008
+ is_const_v<const int*> // \tcode{false}
16009
+ is_const_v<const int&> // \tcode{false}
16010
+ is_const_v<int[3]> // \tcode{false}
16011
+ is_const_v<const int[3]> // \tcode{true}
15998
16012
\end{codeblock}
15999
16013
\end{example}
16000
16014
0 commit comments