Changeset ee51635 in mainline
- Timestamp:
- 2018-07-05T21:41:19Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 48d9187
- Parents:
- 22ba300
- git-author:
- Dzejrou <dzejrou@…> (2018-03-01 17:42:41)
- git-committer:
- Dzejrou <dzejrou@…> (2018-07-05 21:41:19)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/cpp/include/impl/type_traits.hpp
r22ba300 ree51635 103 103 104 104 template<class T> 105 inline constexpr bool is_void_v = is_void<T>::value; 106 107 template<class T> 105 108 struct is_null_pointer: aux::is_same<remove_cv_t<T>, nullptr_t> 106 109 { /* DUMMY BODY */ }; 110 111 template<class T> 112 inline constexpr bool is_null_pointer_v = is_null_pointer<T>::value; 107 113 108 114 template<class T> … … 110 116 bool, char, unsigned char, signed char, 111 117 long, unsigned long, int, unsigned int, short, 112 unsigned short, long long, unsigned long long> 118 unsigned short, long long, unsigned long long, 119 char16_t, char32_t, wchar_t> 113 120 { /* DUMMY BODY */ }; 114 121 … … 118 125 { /* DUMMY BODY */ }; 119 126 127 template<class T> 128 inline constexpr bool is_floating_point_v = is_floating_point<T>::value; 129 120 130 template<class> 121 131 struct is_array: false_type … … 125 135 struct is_array<T[]>: true_type 126 136 { /* DUMMY BODY */ }; 137 138 template<class T> 139 inline constexpr bool is_array_v = is_array<T>::value; 127 140 128 141 namespace aux … … 142 155 143 156 template<class T> 157 inline constexpr bool is_pointer_v = is_pointer<T>::value; 158 159 template<class T> 144 160 struct is_lvalue_reference: false_type 145 161 { /* DUMMY BODY */ }; … … 148 164 struct is_lvalue_reference<T&>: true_type 149 165 { /* DUMMY BODY */ }; 166 167 template<class T> 168 inline constexpr bool is_lvalue_reference_v = is_lvalue_reference<T>::value; 150 169 151 170 template<class T> … … 156 175 struct is_rvalue_reference<T&&>: true_type 157 176 { /* DUMMY BODY*/ }; 177 178 template<class T> 179 inline constexpr bool is_rvalue_reference_v = is_rvalue_reference<T>::value; 158 180 159 181 template<class> … … 168 190 !is_member_function_pointer<T>::value> 169 191 { /* DUMMY BODY */ }; 192 193 template<class T> 194 inline constexpr bool is_member_object_pointer_v = is_member_object_pointer<T>::value; 170 195 171 196 template<class> … … 188 213 189 214 template<class T> 215 inline constexpr bool is_member_function_pointer_v = is_member_function_pointer<T>::value; 216 217 template<class T> 190 218 struct is_enum: aux::value_is<bool, __is_enum(T)> 191 219 { /* DUMMY BODY */ }; 192 220 193 221 template<class T> 222 inline constexpr bool is_enum_v = is_enum<T>::value; 223 224 template<class T> 194 225 struct is_union: aux::value_is<bool, __is_union(T)> 195 226 { /* DUMMY BODY */ }; 196 227 197 228 template<class T> 229 inline constexpr bool is_union_v = is_union<T>::value; 230 231 template<class T> 198 232 struct is_class: aux::value_is<bool, __is_class(T)> 199 233 { /* DUMMY BODY */ }; 234 235 template<class T> 236 inline constexpr bool is_class_v = is_class<T>::value; 200 237 201 238 /** … … 399 436 { /* DUMMY BODY */ }; 400 437 438 template<class T> 439 inline constexpr bool is_function_v = is_function<T>::value; 440 401 441 /** 402 442 * 20.10.4.2, composite type categories: … … 414 454 struct is_reference<T&&>: true_type 415 455 { /* DUMMY BODY */ }; 456 457 template<class T> 458 inline constexpr bool is_reference_v = is_reference<T>::value; 416 459 417 460 template<class T> … … 420 463 is_integral<T>::value || is_floating_point<T>::value> 421 464 { /* DUMMY BODY */ }; 465 466 template<class T> 467 inline constexpr bool is_arithmetic_v = is_arithmetic<T>::value; 422 468 423 469 template<class T> … … 448 494 { /* DUMMY BODY */ }; 449 495 496 template<class T> 497 inline constexpr bool is_member_pointer_v = is_member_pointer<T>::value; 498 450 499 /** 451 500 * 20.10.4.3, type properties: … … 461 510 462 511 template<class T> 512 inline constexpr bool is_const_v = is_const<T>::value; 513 514 template<class T> 463 515 struct is_volatile: false_type 464 516 { /* DUMMY BODY */}; … … 467 519 struct is_volatile<T volatile>: true_type 468 520 { /* DUMMY BODY */ }; 521 522 template<class T> 523 inline constexpr bool is_volatile_v = is_volatile<T>::value; 469 524 470 525 /** … … 486 541 487 542 template<class T> 543 inline constexpr bool is_trivial_v = is_trivial<T>::value; 544 545 template<class T> 488 546 struct is_trivially_copyable: aux::value_is<bool, __has_trivial_copy(T)> 489 547 { /* DUMMY BODY */ }; 490 548 491 549 template<class T> 550 inline constexpr bool is_trivially_copyable_v = is_trivially_copyable<T>::value; 551 552 template<class T> 492 553 struct is_standard_layout; 493 554 … … 497 558 498 559 template<class T> 560 inline constexpr bool is_pod_v = is_pod<T>::value; 561 562 template<class T> 499 563 struct is_literal_type: aux::value_is<bool, __is_literal_type(T)> 500 564 { /* DUMMY BODY */ }; 501 565 502 566 template<class T> 567 inline constexpr bool is_literal_type_v = is_literal_type<T>::value; 568 569 template<class T> 503 570 struct is_empty: aux::value_is<bool, __is_empty(T)> 504 571 { /* DUMMY BODY */ }; 505 572 506 573 template<class T> 574 inline constexpr bool is_empty_v = is_empty<T>::value; 575 576 template<class T> 507 577 struct is_polymorphic: aux::value_is<bool, __is_polymorphic(T)> 508 578 { /* DUMMY BODY */ }; 509 579 510 580 template<class T> 581 inline constexpr bool is_polymorphic_v = is_polymorphic<T>::value; 582 583 template<class T> 511 584 struct is_abstract: aux::value_is<bool, __is_abstract(T)> 512 585 { /* DUMMY BODY */ }; 513 586 514 587 template<class T> 588 inline constexpr bool is_abstract_v = is_abstract<T>::value; 589 590 template<class T> 515 591 struct is_final: aux::value_is<bool, __is_final(T)> 516 592 { /* DUMMY BODY */ }; 593 594 template<class T> 595 inline constexpr bool is_final_v = is_final<T>::value; 517 596 518 597 namespace aux … … 545 624 546 625 template<class T> 626 inline constexpr bool is_signed_v = is_signed<T>::value; 627 628 template<class T> 547 629 struct is_unsigned: aux::is_unsigned<T> 548 630 { /* DUMMY BODY */ }; 631 632 template<class T> 633 inline constexpr bool is_unsigned_v = is_unsigned<T>::value; 549 634 550 635 template<class T, class... Args> … … 577 662 578 663 template<class T> 664 inline constexpr bool is_trivially_constructible_v = is_trivially_constructible<T>::value; 665 666 template<class T> 579 667 struct is_trivially_default_constructible; 580 668 … … 582 670 struct is_trivially_copy_constructible: aux::value_is<bool, __has_trivial_copy(T)> 583 671 { /* DUMMY BODY */ }; 672 673 template<class T> 674 inline constexpr bool is_trivially_copy_constructible_v = is_trivially_copy_constructible<T>::value; 584 675 585 676 template<class T> … … 590 681 { /* DUMMY BODY */ }; 591 682 683 template<class T, class U> 684 inline constexpr bool is_trivially_assignable_v = is_trivially_assignable<T, U>::value; 685 592 686 template<class T> 593 687 struct is_trivially_copy_assignable; … … 599 693 struct is_trivially_destructible: aux::value_is<bool, __has_trivial_destructor(T)> 600 694 { /* DUMMY BODY */ }; 695 696 template<class T> 697 inline constexpr bool is_trivially_destructible_v = is_trivially_destructible<T>::value; 601 698 602 699 template<class T, class... Args> … … 605 702 606 703 template<class T> 704 inline constexpr bool is_nothrow_constructible_v = is_nothrow_constructible<T>::value; 705 706 template<class T> 607 707 struct is_nothrow_default_constructible; 608 708 … … 610 710 struct is_nothrow_copy_constructible: aux::value_is<bool, __has_nothrow_copy(T)> 611 711 { /* DUMMY BODY */ }; 712 713 template<class T> 714 inline constexpr bool is_nothrow_copy_constructible_v = is_nothrow_copy_constructible<T>::value; 612 715 613 716 template<class T> … … 618 721 { /* DUMMY BODY */ }; 619 722 723 template<class T, class U> 724 inline constexpr bool is_nothrow_assignable_v = is_nothrow_assignable<T, U>::value; 725 620 726 template<class T> 621 727 struct is_nothrow_copy_assignable; … … 630 736 struct has_virtual_destructor: aux::value_is<bool, __has_virtual_destructor(T)> 631 737 { /* DUMMY BODY */ }; 738 739 template<class T> 740 inline constexpr bool has_virtual_destructor_v = has_virtual_destructor<T>::value; 632 741 633 742 /** … … 650 759 { /* DUMMY BODY */ }; 651 760 761 template<class T> 762 inline constexpr size_t rank_v = rank<T>::value; 763 652 764 template<class T, unsigned I = 0> 653 765 struct extent; … … 661 773 { /* DUMMY BODY */ }; 662 774 775 template<class T, class U> 776 inline constexpr bool is_same_v = is_same<T, U>::value; 777 663 778 template<class Base, class Derived> 664 779 struct is_base_of; 780 781 template<class Base, class Derived> 782 inline constexpr bool is_base_of_v = is_base_of<Base, Derived>::value; 665 783 666 784 template<class From, class To>
Note:
See TracChangeset
for help on using the changeset viewer.