YSTest: meta.hpp 源文件

YSTest PreAlpha_b900_20201012 The YSLib Test Project

meta.hpp
浏览该文件的文档.
1 /*
2 © 2011-2016, 2018-2020 FrankHB.
3
4 This file is part of the YSLib project, and may only be used,
5 modified, and distributed under the terms of the YSLib project
6 license, LICENSE.TXT. By continuing to use, modify, or distribute
7 this file you indicate that you have read the license and
8 understand and accept it fully.
9 */
10
28 #ifndef YB_INC_ystdex_meta_hpp_
29 #define YB_INC_ystdex_meta_hpp_ 1
30
31 #include "type_inspection.hpp" // for "type_inspection.hpp",
32 // __cpp_lib_transformation_trait_aliases, __cpp_lib_void_t, is_same, or_,
33 // nor_, and_, is_trivial, is_class, is_union, is_convertible, not_;
34 #include "integral_constant.hpp" // for true_;
35
36 namespace ystdex
37 {
38
44 template<class _type>
45 using _t = typename _type::type;
46
51 inline namespace cpp2011
52 {
53
55
56 using std::remove_const;
57 using std::remove_volatile;
58 using std::remove_cv;
59 using std::add_const;
60 using std::add_volatile;
61 using std::add_cv;
62
63 using std::remove_reference;
64 using std::add_lvalue_reference;
65 using std::add_rvalue_reference;
66
67 using std::make_signed;
68 using std::make_unsigned;
69
70 using std::remove_extent;
71 using std::remove_all_extents;
72
73 using std::remove_pointer;
74 using std::add_pointer;
75
76 // XXX: See $2018-12 @ %Documentation::Workflow.
78 using std::aligned_storage;
80 using std::aligned_union;
81 using std::decay;
82 using std::enable_if;
83 using std::conditional;
84 using std::common_type;
86 using std::underlying_type;
88
89 } // inline namespace cpp2011;
90
91
96 inline namespace cpp2014
97 {
98
104 #if __cpp_lib_transformation_trait_aliases >= 201304L
105 using std::remove_const_t;
106 using std::remove_volatile_t;
107 using std::remove_cv_t;
108 using std::add_const_t;
109 using std::add_volatile_t;
110 using std::add_cv_t;
111
112 using std::remove_reference_t;
113 using std::add_lvalue_reference_t;
114 using std::add_rvalue_reference_t;
115
116 using std::make_signed_t;
117 using std::make_unsigned_t;
118
119 using std::remove_extent_t;
120 using std::remove_all_extents_t;
121
122 using std::remove_pointer_t;
123 using std::add_pointer_t;
124
125 using std::aligned_storage_t;
126 using std::aligned_union_t;
127 using std::decay_t;
128 using std::enable_if_t;
129 using std::conditional_t;
130 using std::common_type_t;
131 using std::underlying_type_t;
132 #else
133
135 template<typename _type>
136 using remove_const_t = typename remove_const<_type>::type;
137
138 template<typename _type>
139 using remove_volatile_t = typename remove_volatile<_type>::type;
140
141 template<typename _type>
142 using remove_cv_t = typename remove_cv<_type>::type;
143
144 template<typename _type>
145 using add_const_t = typename add_const<_type>::type;
146
147 template<typename _type>
148 using add_volatile_t = typename add_volatile<_type>::type;
149
150 template<typename _type>
151 using add_cv_t = typename add_cv<_type>::type;
152
153
154 template<typename _type>
155 using remove_reference_t = typename remove_reference<_type>::type;
156
157 template<typename _type>
158 using add_lvalue_reference_t = typename add_lvalue_reference<_type>::type;
159
160 template<typename _type>
161 using add_rvalue_reference_t = typename add_rvalue_reference<_type>::type;
162
163
164 template<typename _type>
165 using make_signed_t = typename make_signed<_type>::type;
166
167 template<typename _type>
168 using make_unsigned_t = typename make_unsigned<_type>::type;
169
170
171 template<typename _type>
172 using remove_extent_t = typename remove_extent<_type>::type;
173
174 template<typename _type>
175 using remove_all_extents_t = typename remove_all_extents<_type>::type;
176
177
178 template<typename _type>
179 using remove_pointer_t = typename remove_pointer<_type>::type;
180
181 template<typename _type>
182 using add_pointer_t = typename add_pointer<_type>::type;
183
184
185 template<size_t _vLen,
186 size_t _vAlign = yalignof(typename aligned_storage<_vLen>::type)>
187 using aligned_storage_t = typename aligned_storage<_vLen, _vAlign>::type;
189
191
192 template<size_t _vLen, typename... _types>
193 using aligned_union_t = typename aligned_union<_vLen, _types...>::type;
194
195 template<typename _type>
196 using decay_t = typename decay<_type>::type;
197
198 template<bool _bCond, typename _type = void>
199 using enable_if_t = typename enable_if<_bCond, _type>::type;
200
201 template<bool _bCond, typename _type, typename _type2>
202 using conditional_t = typename conditional<_bCond, _type, _type2>::type;
203
204 template<typename... _types>
205 using common_type_t = typename common_type<_types...>::type;
206
207 template<typename _type>
208 using underlying_type_t = typename underlying_type<_type>::type;
210 #endif
211
212
213 } // inline namespace cpp2014;
214
216
217
219 #if __cplusplus > 201703L
220 using std::remove_cvref;
221 using std::remove_cvref_t;
222 #else
223
230 template<typename _type>
231 struct remove_cvref : remove_cv<remove_reference_t<_type>>
232 {};
233
235 template<typename _type>
236 using remove_cvref_t = _t<remove_cvref<_type>>;
237 #endif
238
239
240
241
243
244
246 template<typename _type>
248 struct always
249 {
250 private:
251 template<typename...>
252 struct impl
253 {
254 using type = _type;
255 };
256
257 public:
258 template<typename... _types>
259 using apply = impl<_types...>;
260 };
261
269 #if YB_IMPL_MSCPP >= 1900 || YB_IMPL_GNUCPP > 50000 || YB_IMPL_CLANGPP \
270 || __cplusplus >= 201703L
271 template<typename _type, typename...>
272 using well_formed_t = _type;
273 #else
274 template<typename _type, typename... _types>
275 using well_formed_t = typename always<_type>::template apply<_types...>::type;
276 #endif
277
279 inline namespace cpp2017
280 {
281
287 #if __cpp_lib_void_t >= 201411L
288 using std::void_t;
289 #else
290 template<typename... _types>
292 using void_t = well_formed_t<void, _types...>;
293 #endif
294
295 } // inline namespace cpp2017;
296
297
304 template<bool _bCond>
305 struct when;
306
312 template<typename... _types>
313 using when_valid = well_formed_t<when<true>, _types...>;
314
321 template<bool _bCond>
322 using enable_when = enable_if_t<_bCond, when<true>>;
324
325
326
331 struct any_constructible
332 {
333 any_constructible(...);
334 };
335
336
342 struct nonesuch
343 {
344 nonesuch() = delete;
345 nonesuch(const nonesuch&) = delete;
346 ~nonesuch() = delete;
347
348 void
349 operator=(const nonesuch&) = delete;
350 };
351
352
359 namespace details
360 {
361
362 template<typename _tDefault, typename, template<typename...> class, typename...>
363 struct detector
364 {
365 using value_t = false_;
366 using type = _tDefault;
367 };
368
369 template<typename _tDefault, template<typename...> class _gOp,
370 typename... _tParams>
371 struct detector<_tDefault, void_t<_gOp<_tParams...>>, _gOp, _tParams...>
372 {
373 using value_t = true_;
374 using type = _gOp<_tParams...>;
375 };
376
377
379
380 template<typename _type1, typename _type2,
381 bool _vSame = is_same<_type1, _type2>::value>
382 struct is_same_or_convertible : is_convertible<_type1, _type2>
383 {};
384
385 template<typename _type1, typename _type2>
386 struct is_same_or_convertible<_type1, _type2, true> : true_
387 {};
389
390 } // namespace details;
391
393
394 template<template<typename...> class _gOp, typename... _tParams>
395 using is_detected
396 = typename details::detector<nonesuch, void, _gOp, _tParams...>::value_t;
397
398 template<template<typename...> class _gOp, typename... _tParams>
399 using detected_t = _t<details::detector<nonesuch, void, _gOp, _tParams...>>;
400
401 template<typename _tDefault, template<typename...> class _gOp,
402 typename... _tParams>
403 using detected_or = details::detector<_tDefault, void, _gOp, _tParams...>;
404
405 template<typename _tDefault, template<typename...> class _gOp,
406 typename... _tParams>
407 using detected_or_t = _t<detected_or<_tDefault, _gOp, _tParams...>>;
408
409 template<typename _tExpected, template<typename...> class _gOp,
410 typename... _tParams>
411 using is_detected_exact = is_same<_tExpected, detected_t<_gOp, _tParams...>>;
412
413 template<typename _tTo, template<typename...> class _gOp, typename... _tParams>
414 using is_detected_convertible
415 = is_convertible<detected_t<_gOp, _tParams...>, _tTo>;
417
418
419
425
427
431 template<typename _type>
432 struct is_array_of_unknown_bound
433 : bool_<is_array<_type>::value && extent<_type>::value == 0>
434 {};
435
436
441 template<typename _type>
442 struct is_object_or_void : or_<is_object<_type>, is_void<_type>>
443 {};
444
445
447 namespace details
448 {
449
450 template<typename _type>
451 struct is_referenceable_function : false_
452 {};
453
454 template<typename _tRes, typename... _tParams ynoexcept_param(ne)>
455 struct is_referenceable_function<_tRes(_tParams...) ynoexcept_qual(ne)> : true_
456 {};
457
458 template<typename _tRes, typename... _tParams ynoexcept_param(ne)>
459 struct is_referenceable_function<_tRes(_tParams..., ...) ynoexcept_qual(ne)>
460 : true_
461 {};
462
463 } // namespace details;
464
470 template<typename _type>
471 struct is_referenceable : or_<is_object<_type>, is_reference<_type>,
472 details::is_referenceable_function<_type>>
473 {};
474
475
482 template<typename _type>
483 struct is_returnable
484 : nor_<is_array<_type>, is_abstract<_type>, is_function<_type>>
485 {};
486
487
492 template<typename _type>
493 struct is_class_type
494 : or_<is_class<_type>, is_union<_type>>
495 {};
496
497
502 template<typename _type>
503 struct is_nonconst_object
504 : and_<is_object<_type>, is_same<add_const_t<_type>, _type>>
505 {};
506
507
509
510 template<typename _type>
512 struct is_pointer_to_object
513 : and_<is_pointer<_type>, is_object<remove_pointer_t<_type>>>
514 {};
515
516
518 template<typename _type>
519 struct is_object_pointer
520 : and_<is_pointer<_type>, is_object_or_void<remove_pointer_t<_type>>>
521 {};
522
523
525 template<typename _type>
526 struct is_function_pointer
527 : and_<is_pointer<_type>, is_function<remove_pointer_t<_type>>>
528 {};
530
531
533
534 template<typename _type>
536 struct is_class_pointer
537 : and_<is_pointer<_type>, is_class<remove_pointer_t<_type>>>
538 {};
539
540
542 template<typename _type>
543 struct is_lvalue_class_reference
544 : and_<is_lvalue_reference<_type>, is_class<remove_reference_t<_type>>>
545 {};
546
547
549 template<typename _type>
550 struct is_rvalue_class_reference
551 : and_<is_rvalue_reference<_type>, is_class<remove_reference_t<_type>>>
552 {};
554
555
566 template<typename _type>
567 struct is_trivial_class : and_<is_trivial<_type>, is_class<_type>>
568 {};
569
570 template<typename _type>
571 struct is_trivial_class_type : and_<is_trivial<_type>, is_class_type<_type>>
572 {};
573
575 template<typename _type>
576 struct is_trivial_union : and_<is_trivial<_type>, is_union<_type>>
577 {};
579
580
581
586 template<typename _type>
587 struct is_cv : or_<is_const<_type>, is_volatile<_type>>
588 {};
590
591
597 template<typename>
598 struct is_decomposable : false_
599 {};
600
601 template<template<typename...> class _gOp, typename... _types>
602 struct is_decomposable<_gOp<_types...>> : true_
603 {};
605
606
613 template<typename _type>
614 struct is_copyable
615 : and_<is_copy_constructible<_type>, is_copy_assignable<_type>>
616 {};
617
618
619 template<typename _type>
620 struct is_moveable
621 : and_<is_move_constructible<_type>, is_move_assignable<_type>>
622 {};
623
624
625 template<typename _type>
626 struct is_nothrow_copyable : and_<is_nothrow_copy_constructible<_type>,
627 is_nothrow_copy_assignable<_type>>
628 {};
629
630
631 template<typename _type>
632 struct is_nothrow_moveable : and_<is_nothrow_move_constructible<_type>,
633 is_nothrow_move_assignable<_type>>
634 {};
635
636
637 template<typename _type>
638 struct is_trivially_copyable : and_<is_trivially_copy_constructible<_type>,
639 is_trivially_copy_assignable<_type>>
640 {};
641
642
643 template<typename _type>
644 struct is_trivially_moveable : and_<is_trivially_move_constructible<_type>,
645 is_trivially_move_assignable<_type>>
646 {};
647
648
654 template<typename _type>
655 struct is_throwing_move_copyable : and_<is_copy_constructible<_type>,
656 not_<is_nothrow_move_constructible<_type>>>
657 {};
659
660
661
663
664
666
670 template<typename _type, typename _tTo = _type>
671 struct is_decayed : is_same<_type, decay_t<_tTo>>
672 {};
673
674
679 template<typename _type, typename _tTo = _type>
680 struct is_unqualified : is_same<_type, remove_cv_t<_tTo>>
681 {};
683
684
690 template<typename _type>
691 struct is_unqualified_object
692 : and_<is_object<_type>, is_unqualified<_type>>
693 {};
695
696
698
699
704 template<typename _type1, typename _type2>
705 struct is_same_or_convertible : details::is_same_or_convertible<_type1, _type2>
706 {};
707
708
713 template<typename _type1, typename _type2>
714 struct is_interoperable : or_<is_same_or_convertible<_type1, _type2>,
715 is_convertible<_type2, _type1>>
716 {};
717
718
720
721 template <typename _type, typename _tFrom>
723 struct is_explicitly_constructible : and_<is_constructible<_type, _tFrom>,
724 not_<is_convertible<_tFrom, _type>>>
725 {};
726
727
729 template <typename _type, typename _tFrom>
730 struct is_explicitly_nothrow_constructible : and_<is_nothrow_constructible<
731 _type, _tFrom>, not_<is_convertible<_tFrom, _type>>>
732 {};
733
734
736 template <typename _type, typename _tFrom>
737 struct is_implicitly_constructible : and_<is_constructible<_type, _tFrom>,
738 is_convertible<_tFrom, _type>>
739 {};
740
741
743 template <typename _type, typename _tFrom>
744 struct is_implicitly_nothrow_constructible : and_<is_nothrow_constructible<
745 _type, _tFrom>, is_convertible<_tFrom, _type>>
746 {};
748
749
754 template<typename _type, typename _tParam>
755 struct is_same_param : is_same<_type&, decay_t<_tParam>&>
756 {};
758
759
765 template<typename _type, typename... _types>
767 struct are_same : and_<is_same<_type, _types>...>
768 {};
769
771 template<typename _type, typename... _types>
772 struct is_in_types : or_<is_same<_type, _types>...>
773 {};
775
776
786 template<typename _tCond, typename _tThen = true_, typename _tElse = false_>
787 using cond = conditional<_tCond::value, _tThen, _tElse>;
788
793 template<typename _tCond, typename _tThen = true_, typename _tElse = false_>
794 using cond_t = _t<cond<_tCond, _tThen, _tElse>>;
796
798
799
813 template<typename _type>
814 struct identity
815 {
816 using type = _type;
817 };
818
820 template<typename _type>
821 using identity_t = _t<identity<_type>>;
823
824
826 template<typename _type>
827 using sizeof_t = size_t_<sizeof(_type)>;
828
829
835 template<typename _tFrom, typename _tTo, typename _type = void>
836 using enable_if_convertible_t
837 = enable_if_t<is_convertible<_tFrom, _tTo>::value, _type>;
838
840 template<typename _tFrom, typename _tTo, typename _type = void>
841 using enable_if_inconvertible_t
842 = enable_if_t<!is_convertible<_tFrom, _tTo>::value, _type>;
843
844 template<typename _type1, typename _type2, typename _type = void>
845 using enable_if_interoperable_t
846 = enable_if_t<is_interoperable<_type1, _type2>::value, _type>;
847
849 template<typename _type1, typename _type2, typename _type = void>
850 using enable_if_same_t
851 = enable_if_t<is_same<_type1, _type2>::value, _type>;
852
854 template<typename _type1, typename _type2, typename _type = void>
855 using enable_if_same_param_t
856 = enable_if_t<is_same_param<_type1, _type2>::value, _type>;
857
863 template<typename _tSelected, typename _tParam, typename _type = void>
864 using exclude_self_t
865 = enable_if_t<!is_same_param<_tSelected, _tParam>::value, _type>;
867
868
869 } // namespace ystdex;
870
871 #endif
872
ystdex::cond
conditional< _tCond::value, _tThen, _tElse > cond
条件判断。
Definition: meta.hpp:787
ystdex::cpp2017::apply
auto apply(_func &&f, _tTuple &&t) -> decltype(call_projection< _tTuple, make_index_sequence< std::tuple_size< decay_t< _tTuple >>::value >>::apply_invoke(std::forward< decltype(f)>(f), std::forward< decltype(t)>(t)))
应用函数对象和参数元组。
Definition: apply.hpp:199
ystdex::cpp2014::remove_extent_t
typename remove_extent< _type >::type remove_extent_t
Definition: meta.hpp:172
ystdex::nonesuch::operator=
void operator=(const nonesuch &)=delete
ystdex::cpp2014::conditional_t
typename conditional< _bCond, _type, _type2 >::type conditional_t
Definition: meta.hpp:202
ystdex::any_constructible
接受任意参数类型构造的类型。
Definition: meta.hpp:332
ystdex::cpp2014::add_pointer_t
typename add_pointer< _type >::type add_pointer_t
Definition: meta.hpp:182
ystdex::always::impl::type
_type type
Definition: meta.hpp:254
ystdex::cpp2014::remove_volatile_t
typename remove_volatile< _type >::type remove_volatile_t
Definition: meta.hpp:139
ystdex::detected_or_t
_t< detected_or< _tDefault, _gOp, _tParams... > > detected_or_t
Definition: meta.hpp:407
ystdex::is_object_or_void
判断指定类型是否为对象或 void 类型。
Definition: meta.hpp:443
ystdex::is_returnable
判断指定类型是否可作为返回类型。
Definition: meta.hpp:485
ystdex::detected_t
_t< details::detector< nonesuch, void, _gOp, _tParams... > > detected_t
Definition: meta.hpp:399
yalignof
#define yalignof(_type)
指定特定类型的对齐。
Definition: ydef.h:1053
ystdex::is_copyable
Definition: meta.hpp:616
ystdex::is_function_pointer
判断指定类型是否是指向函数类型的指针。
Definition: meta.hpp:528
ystdex::is_trivial_class_type
Definition: meta.hpp:572
ystdex::cpp2014::add_rvalue_reference_t
typename add_rvalue_reference< _type >::type add_rvalue_reference_t
Definition: meta.hpp:161
ystdex::cpp2014::enable_if_t
typename enable_if< _bCond, _type >::type enable_if_t
Definition: meta.hpp:199
ystdex::well_formed_t
typename always< _type >::template apply< _types... >::type well_formed_t
void_t 的一般化，可指定别名类型。
Definition: meta.hpp:275
ystdex::cpp2014::remove_all_extents_t
typename remove_all_extents< _type >::type remove_all_extents_t
Definition: meta.hpp:175
ystdex::cpp2014::aligned_storage_t
typename aligned_storage< _vLen, _vAlign >::type aligned_storage_t
Definition: meta.hpp:187
ystdex::is_nonconst_object
判断类型是否为非 const 对象类型。
Definition: meta.hpp:505
ystdex::nonesuch::nonesuch
nonesuch()=delete
ystdex::details::is_same_or_convertible
Definition: meta.hpp:383
ystdex::is_lvalue_class_reference
判断指定类型是否是类类型左值引用。
Definition: meta.hpp:545
ystdex::cpp2014::remove_pointer_t
typename remove_pointer< _type >::type remove_pointer_t
Definition: meta.hpp:179
ystdex::is_cv
判断指定类型是否为 const 或 volatile 类型。
Definition: meta.hpp:588
ystdex::is_trivially_moveable
Definition: meta.hpp:646
ystdex::is_same_or_convertible
判断指定类型之间是否相同或可转换。
Definition: meta.hpp:706
ystdex::when_valid
well_formed_t< when< true >, _types... > when_valid
类似 void_t 的元函数，但具有较低匹配优先级，避免偏特化歧义。
Definition: meta.hpp:313
ystdex::is_implicitly_nothrow_constructible
判断指定类型是否可被指定参数类型无异常抛出构造且可隐式构造。
Definition: meta.hpp:746
ystdex::cpp2014::make_unsigned_t
typename make_unsigned< _type >::type make_unsigned_t
Definition: meta.hpp:168
ystdex::is_array_of_unknown_bound
判断是否为未知大小的数组类型。
Definition: meta.hpp:434
ystdex::is_referenceable
判断指定类型是否为可引用类型。
Definition: meta.hpp:473
ystdex::is_object_pointer
判断指定类型是否是指向对象类型的指针。
Definition: meta.hpp:521
ystdex::is_trivial_class
判断指定类型是否是平凡的非联合类类型。
Definition: meta.hpp:568
ystdex::is_decayed
判断指定类型是否已退化为指定类型。
Definition: meta.hpp:672
ystdex::is_explicitly_constructible
判断指定类型是否可被指定参数类型构造且要求显式构造。
Definition: meta.hpp:725
ystdex::is_nothrow_copyable
Definition: meta.hpp:628
ystdex::are_same
判断第一参数和之后的参数指定的类型相同。
Definition: meta.hpp:768
ystdex::bool_
integral_constant< bool, _vInt > bool_
Definition: integral_constant.hpp:93
ystdex::cpp2014::make_signed_t
typename make_signed< _type >::type make_signed_t
Definition: meta.hpp:165
ystdex::enable_if_inconvertible_t
enable_if_t<!is_convertible< _tFrom, _tTo >::value, _type > enable_if_inconvertible_t
Definition: meta.hpp:842
ystdex::cpp2017::void_t
well_formed_t< void, _types... > void_t
Definition: meta.hpp:292
ystdex::identity_t
_t< identity< _type > > identity_t
Definition: meta.hpp:821
ystdex::details::_type2
_type2
Definition: operators.hpp:241
ystdex::cpp2014::decay_t
typename decay< _type >::type decay_t
Definition: meta.hpp:196
ystdex::cpp2014::aligned_union_t
typename aligned_union< _vLen, _types... >::type aligned_union_t
Definition: meta.hpp:193
ystdex::identity< invoke_mem_obj_ref_t< _tMemPtr, _type > >::type
invoke_mem_obj_ref_t< _tMemPtr, _type > type
Definition: meta.hpp:816
ystdex::is_trivially_copyable
Definition: meta.hpp:640
ystdex::is_unqualified_object
判断类型是否为非 const 对象类型。
Definition: meta.hpp:693
ystdex::is_implicitly_constructible
判断指定类型是否可被指定参数类型构造且可隐式构造。
Definition: meta.hpp:739
ystdex::identity
恒等元函数。
Definition: meta.hpp:815
ystdex::or_
逻辑或。
Definition: integral_constant.hpp:172
ystdex::details::detector
Definition: meta.hpp:364
ystdex::any_constructible::any_constructible
any_constructible(...)
ystdex::always
表达式 SFINAE 别名模板。
Definition: meta.hpp:249
ystdex::details::detector< _tDefault, void_t< _gOp< _tParams... > >, _gOp, _tParams... >::type
_gOp< _tParams... > type
Definition: meta.hpp:374
ystdex::details::detector::value_t
false_ value_t
Definition: meta.hpp:365
type_inspection.hpp
类型检查元编程设施。
ystdex::enable_when
enable_if_t< _bCond, when< true > > enable_when
类似 enable_if_t 的元函数，但具有较低匹配优先级，避免偏特化歧义。
Definition: meta.hpp:322
ystdex::size_t_
integral_constant< size_t, _vInt > size_t_
Definition: integral_constant.hpp:103
ystdex::nonesuch::nonesuch
nonesuch(const nonesuch &)=delete
ystdex::cpp2014::add_lvalue_reference_t
typename add_lvalue_reference< _type >::type add_lvalue_reference_t
Definition: meta.hpp:158
ystdex::details::detector< _tDefault, void_t< _gOp< _tParams... > >, _gOp, _tParams... >::value_t
true_ value_t
Definition: meta.hpp:373
ystdex::when
类似 void_t 的元函数，具有较低匹配优先级，避免偏特化歧义；但使用条件表达式。
Definition: meta.hpp:305
ystdex::cpp2014::remove_cv_t
typename remove_cv< _type >::type remove_cv_t
Definition: meta.hpp:142
ystdex::is_detected_convertible
is_convertible< detected_t< _gOp, _tParams... >, _tTo > is_detected_convertible
Definition: meta.hpp:415
ystdex::nonesuch::~nonesuch
~nonesuch()=delete
ystdex::cpp2014::remove_const_t
typename remove_const< _type >::type remove_const_t
ISO C++ 14 兼容类型操作别名。
Definition: meta.hpp:136
integral_constant.hpp
整数类型常量。
ystdex::is_class_type
判断指定类型是否是类类型。
Definition: meta.hpp:495
ystdex::details::is_referenceable_function
Definition: meta.hpp:452
ynoexcept_qual
#define ynoexcept_qual(...)
影响函数类型的 noexcept 限定符表达式。
Definition: ydef.h:1173
ystdex::true_
bool_< true > true_
Definition: integral_constant.hpp:109
ystdex::nonesuch
不接受任意参数类型构造的类型。
Definition: meta.hpp:343
ystdex::is_trivial_union
判断指定类型是否是平凡的联合类型。
Definition: meta.hpp:577
ystdex::remove_cvref
移除可能被 cv-qualifier 修饰的引用类型。
Definition: meta.hpp:232
ystdex::cond_t
_t< cond< _tCond, _tThen, _tElse > > cond_t
Definition: meta.hpp:794
ystdex::cpp2014::add_cv_t
typename add_cv< _type >::type add_cv_t
Definition: meta.hpp:151
ystdex::exclude_self_t
enable_if_t<!is_same_param< _tSelected, _tParam >::value, _type > exclude_self_t
排除选择类型的特定参数的重载。
Definition: meta.hpp:865
ystdex::details::detector::type
_tDefault type
Definition: meta.hpp:366
ystdex::enable_if_same_t
enable_if_t< is_same< _type1, _type2 >::value, _type > enable_if_same_t
Definition: meta.hpp:851
ystdex::cpp2014::add_const_t
typename add_const< _type >::type add_const_t
Definition: meta.hpp:145
ystdex::cpp2014::underlying_type_t
typename underlying_type< _type >::type underlying_type_t
Definition: meta.hpp:208
ystdex::sizeof_t
size_t_< sizeof(_type)> sizeof_t
Definition: meta.hpp:827
ystdex::enable_if_convertible_t
enable_if_t< is_convertible< _tFrom, _tTo >::value, _type > enable_if_convertible_t
Definition: meta.hpp:837
ystdex::cpp2014::add_volatile_t
typename add_volatile< _type >::type add_volatile_t
Definition: meta.hpp:148
ystdex
<memory> 特性测试宏。
Definition: ydef.h:1262
ystdex::is_decomposable
判断指定类型是否可分解为一个参数为类型的模板和类型参数。
Definition: meta.hpp:599
ystdex::enable_if_interoperable_t
enable_if_t< is_interoperable< _type1, _type2 >::value, _type > enable_if_interoperable_t
Definition: meta.hpp:846
ystdex::is_pointer_to_object
判断指定类型是否是指向对象类型的指针。
Definition: meta.hpp:514
ystdex::is_rvalue_class_reference
判断指定类型是否是类类型右值引用。
Definition: meta.hpp:552
ynoexcept_param
#define ynoexcept_param(_n)
影响函数类型的 noexcept 限定符参数。
Definition: ydef.h:1172
YSLib::_tParams
YB_ATTR_nodiscard YB_PURE typename _tParams
Definition: ValueNode.h:1294
ystdex::is_interoperable
判断指定类型之间是否相同或可互相转换。
Definition: meta.hpp:716
ystdex::is_class_pointer
判断指定类型是否是指向类类型的指针。
Definition: meta.hpp:538
ystdex::is_moveable
Definition: meta.hpp:622
ystdex::is_throwing_move_copyable
判断指定类型是否为可复制构造但不可无抛出异常地转移构造的类型。
Definition: meta.hpp:657
ystdex::is_same_param
判断第一参数和第二参数指定的参数类型相同。
Definition: meta.hpp:756
ystdex::_t
typename _type::type _t
嵌套类型别名。
Definition: meta.hpp:45
ystdex::is_detected_exact
is_same< _tExpected, detected_t< _gOp, _tParams... > > is_detected_exact
Definition: meta.hpp:411
ystdex::is_detected
typename details::detector< nonesuch, void, _gOp, _tParams... >::value_t is_detected
Definition: meta.hpp:396
ystdex::cpp2014::remove_reference_t
typename remove_reference< _type >::type remove_reference_t
Definition: meta.hpp:155
ystdex::is_nothrow_moveable
Definition: meta.hpp:634
ystdex::is_unqualified
判断指定类型是否为无限定的指定类型。
Definition: meta.hpp:681
ystdex::enable_if_same_param_t
enable_if_t< is_same_param< _type1, _type2 >::value, _type > enable_if_same_param_t
Definition: meta.hpp:856
ystdex::is_explicitly_nothrow_constructible
判断指定类型是否可被指定参数类型无异常抛出构造且要求显式构造。
Definition: meta.hpp:732
ystdex::is_in_types
判断第一参数在之后参数指定的类型中出现。
Definition: meta.hpp:773
ystdex::false_
bool_< false > false_
Definition: integral_constant.hpp:110
ystdex::cpp2014::common_type_t
typename common_type< _types... >::type common_type_t
Definition: meta.hpp:205
ystdex::remove_cvref_t
_t< remove_cvref< _type > > remove_cvref_t
Definition: meta.hpp:236
ystdex::nor_
逻辑或非。
Definition: integral_constant.hpp:207
ystdex::and_
逻辑操作元函数。
Definition: integral_constant.hpp:151
ystdex::always::impl
Definition: meta.hpp:253