32 #ifndef VSMC_CXX11_TYPE_TRAITS_HPP
33 #define VSMC_CXX11_TYPE_TRAITS_HPP
39 #define VSMC_STATIC_ASSERT_CXX11_TYPE_TRATIS_FORWARD_RVALUE \
40 VSMC_STATIC_ASSERT((!is_lvalue_reference<T>::value), \
41 ATTEMPT_TO_FORWARD_AN_RVALUE_AS_AN_LVALUE)
178 template <
typename>
struct rank;
179 template <
typename,
unsigned>
struct extent;
222 #if VSMC_HAS_CXX11_RVALUE_REFERENCES
223 template <
typename T>
226 template <
typename T>
236 template <
typename T, T v>
265 template <
typename T>
struct is_void :
271 #if VSMC_HAS_CXX11_NULLPTR
291 #if VSMC_HAS_CXX11_LONG_LONG
295 #if VSMC_HAS_CXX11_UNICODE_LITERALS
314 template <
typename>
struct is_array :
public false_type {};
315 template <
typename T>
struct is_array<T []> :
public true_type {};
316 template <
typename T, std::
size_t N>
struct is_array<T [N]> :
320 template <
typename T>
struct is_enum :
322 !is_void<T>::value && !is_integral<T>::value &&
323 !is_floating_point<T>::value && !is_pointer<T>::value &&
324 !is_reference<T>::value && !is_member_pointer<T>::value &&
325 !is_union<T>::value && !is_class<T>::value &&
326 !is_function<T>::value> {};
332 template <
typename T>
struct is_union :
340 template <
typename T>
struct is_class :
341 public integral_constant<bool,
342 sizeof(internal::is_class_test<T>(0)) == sizeof(internal::tp_test_true) &&
343 !is_union<T>::value> {};
350 template <
typename T,
bool =
351 is_class<T>::value || is_union<T>::value || is_void<T>::value ||
352 is_reference<T>::value || is_null_pointer<T>::value>
355 sizeof(is_function_test<T>(is_function_test_src<T>())) ==
356 sizeof(tp_test_true)> {};
371 template <
typename>
struct is_lvalue_reference :
public false_type {};
376 #if VSMC_HAS_CXX11_RVALUE_REFERENCES
383 is_member_pointer<T>::value && !is_member_function_pointer<T>::value> {};
389 template <
typename T,
typename U>
394 typename remove_cv<T>::type> {};
404 template <
typename T>
struct is_fundamental :
405 public integral_constant<bool,
406 is_void<T>::value || is_null_pointer<T>::value ||
407 is_arithmetic<T>::value> {};
410 template <
typename T>
struct is_arithmetic :
411 public integral_constant<bool,
412 is_integral<T>::value || is_floating_point<T>::value> {};
415 template <
typename T>
struct is_scalar :
416 public integral_constant<bool,
417 is_arithmetic<T>::value || is_member_pointer<T>::value ||
418 is_pointer<T>::value || is_null_pointer<T>::value ||
419 is_enum<T>::value> {};
422 template <
typename T>
struct is_object :
423 public integral_constant<bool,
424 is_scalar<T>::value || is_array<T>::value ||
425 is_union<T>::value || is_class<T>::value> {};
428 template <
typename T>
struct is_compound :
429 public integral_constant<bool, !is_fundamental<T>::value> {};
432 template <
typename T>
struct is_reference :
public false_type {};
434 #if VSMC_HAS_CXX11_RVALUE_REFERENCES
442 template <
typename T,
typename U>
456 template <
typename>
struct is_const :
public false_type {};
457 template <
typename T>
struct is_const<const T> :
public true_type {};
460 template <
typename>
struct is_volatile :
public false_type {};
461 template <
typename T>
struct is_volatile<volatile T> :
public true_type {};
471 is_scalar<typename remove_all_extents<T>::type>::value ||
472 is_reference<typename remove_all_extents<T>::type>::value> {};
476 template <
typename is_empty_base>
481 template <
typename T>
struct is_empty :
483 sizeof(internal::is_empty_derived<T>) ==
484 sizeof(internal::is_empty_standalone<T>)> {};
488 template <
typename T>
struct is_polymorphic :
489 public integral_constant<bool, __is_polymorphic(T)> {};
493 typename enable_if<
sizeof(static_cast<T *>(const_cast<void *>(
494 dynamic_cast<const volatile void *>(declval<T *>())
495 ))) != 0,
int>::
type);
498 template <
typename T>
struct is_polymorphic :
499 public integral_constant<bool,
500 sizeof(internal::is_polymorphic_test<T>(0)) ==
501 sizeof(internal::tp_test_true)> {};
510 sizeof(is_abstract_test<T>(0)) == sizeof(tp_test_true)> {};
518 template <typename T, bool = is_integral<T>::value>
519 struct is_signed_num_impl :
520 public integral_constant<bool, static_cast<T>(-1) < static_cast<T>(0)> {};
521 template <typename T>
522 struct is_signed_num_impl<T, false> : public true_type {};
523 template <typename T, bool = is_arithmetic<T>::value> struct is_signed_impl :
524 public is_signed_num_impl<T> {};
525 template <typename T> struct is_signed_impl<T, false> : public false_type {};
527 template <typename T> struct is_signed :
528 public internal::is_signed_impl<T> {};
532 template <typename T, bool = is_integral<T>::value>
533 struct is_unsigned_num_impl :
534 public integral_constant<bool, static_cast<T>(0) < static_cast<T>(-1)> {};
535 template <typename T>
536 struct is_unsigned_num_impl<T, false> : public false_type {};
537 template <typename T, bool = is_arithmetic<T>::value> struct is_unsigned_impl :
538 public is_unsigned_num_impl<T> {};
539 template <typename T> struct is_unsigned_impl<T, false> : public false_type {};
541 template <typename T> struct is_unsigned :
542 public internal::is_unsigned_impl<T> {};
587 template <typename> struct rank :
588 public integral_constant<std::size_t, 0> {};
589 template <typename T> struct rank<T []> :
590 public integral_constant<std::size_t, rank<T>::value + 1> {};
591 template <typename T, std::size_t N> struct rank<T [N]> :
592 public integral_constant<std::size_t, rank<T>::value + 1> {};
595 template <typename, unsigned = 0> struct extent :
596 public integral_constant<std::size_t, 0> {};
597 template <typename T> struct extent<T [], 0> :
598 public integral_constant<std::size_t, 0> {};
599 template <typename T, unsigned I> struct extent<T [], I> :
600 public integral_constant<std::size_t, extent<T, I - 1>::value> {};
601 template <typename T, std::size_t N> struct extent<T [N], 0> :
602 public integral_constant<std::size_t, N> {};
603 template <typename T, std::size_t N, unsigned I> struct extent<T [N], I> :
604 public integral_constant<std::size_t, extent<T, I - 1>::value> {};
614 template <typename, typename> struct is_same : public false_type {};
615 template <typename T> struct is_same<T, T> : public true_type {};
619 template <typename T>
620 struct is_base_of_dest {is_base_of_dest (const volatile T &);};
621 template <typename T>
622 struct is_base_of_src
624 operator const volatile T &();
625 template <typename U> operator const is_base_of_dest<U> &();
628 template <std::size_t> struct is_base_of_fail {typedef tp_test_false type;};
629 template <typename B, typename D>
630 typename is_base_of_fail<sizeof(
631 is_base_of_dest<B>(declval<is_base_of_src<D> >())
632 )>::type is_base_of_test (int);
633 template <typename B, typename D> tp_test_true is_base_of_test (...);
635 template <typename B, typename D> struct is_base_of :
636 public integral_constant<bool, is_class<B>::value &&
637 sizeof(internal::is_base_of_test<B, D>(0)) ==
638 sizeof(internal::tp_test_true)> {};
642 template <typename T> tp_test_true is_convertible_test (T);
643 template <typename> tp_test_false is_convertible_test (...);
644 #if VSMC_HAS_CXX11_RVALUE_REFERENCES
645 template <typename T> T && is_convertible_test_src ();
647 template <typename T>
648 typename remove_reference<T>::type &is_convertible_test_src ();
651 template <typename T,
652 bool IsArray = is_array<T>::value,
653 bool IsFunction = is_function<T>::value,
654 bool IsVoid = is_void<T>::value>
655 struct is_convertible_afv {enum {value = 0};};
656 template <typename T>
657 struct is_convertible_afv<T, true, false, false> {enum {value = 1};};
658 template <typename T>
659 struct is_convertible_afv<T, false, true, false> {enum {value = 2};};
660 template <typename T>
661 struct is_convertible_afv<T, false, false, true> {enum {value = 3};};
663 template <typename T1, typename T2,
664 unsigned T1_afv = is_convertible_afv<T1>::value,
665 unsigned T2_afv = is_convertible_afv<T2>::value>
666 struct is_convertible_impl :
667 public integral_constant<bool,
668 #if VSMC_HAS_CXX11_RVALUE_REFERENCES
669 sizeof(is_convertible_test<T2>(is_convertible_test_src<T1>())) ==
672 sizeof(is_convertible_test<T2>(is_convertible_test_src<T1>())) ==
673 sizeof(tp_test_true) && !(!is_function<T1>::value &&
674 !is_reference<T1>::value && is_reference<T2>::value &&
675 (!is_const<typename remove_reference<T2>::type>::value ||
676 is_volatile<typename remove_reference<T2>::type>::value) &&
677 (is_same<typename remove_cv<T1>::type, typename remove_cv<
678 typename remove_reference<T2>::type>::type>::value ||
679 is_base_of<typename remove_reference<T2>::type, T1>::value))
682 template <typename T1, typename T2>
683 struct is_convertible_impl<T1, T2, 1, 0> : public false_type {};
684 template <typename T1>
685 struct is_convertible_impl<T1, const T1 &, 1, 0> : public true_type {};
686 #if VSMC_HAS_CXX11_RVALUE_REFERENCES
687 template <typename T1>
688 struct is_convertible_impl<T1, T1 &&, 1, 0> : public true_type {};
689 template <typename T1>
690 struct is_convertible_impl<T1, const T1 &&, 1, 0> : public true_type {};
691 template <typename T1>
692 struct is_convertible_impl<T1, volatile T1 &&, 1, 0> : public true_type {};
693 template <typename T1>
694 struct is_convertible_impl<T1, const volatile T1 &&, 1, 0> :
698 template <typename T1, typename T2>
699 struct is_convertible_impl<T1, T2 *, 1, 0> :
700 public integral_constant<bool, is_convertible_impl<
701 typename remove_all_extents<T1>::type *, T2 *>::value> {};
702 template <typename T1, typename T2>
703 struct is_convertible_impl<T1, T2 *const, 1, 0> :
704 public integral_constant<bool, is_convertible_impl<
705 typename remove_all_extents<T1>::type *, T2 *const>::value> {};
706 template <typename T1, typename T2>
707 struct is_convertible_impl<T1, T2 *volatile, 1, 0> :
708 public integral_constant<bool, is_convertible_impl<
709 typename remove_all_extents<T1>::type *, T2 *volatile>::value> {};
710 template <typename T1, typename T2>
711 struct is_convertible_impl<T1, T2 *const volatile, 1, 0> :
712 public integral_constant<bool, is_convertible_impl<
713 typename remove_all_extents<T1>::type *, T2 *const volatile>::value> {};
715 template <typename T1, typename T2>
716 struct is_convertible_impl<T1, T2, 2, 0> : public false_type {};
717 #if VSMC_HAS_CXX11_RVALUE_REFERENCES
718 template <typename T1>
719 struct is_convertible_impl<T1, T1 &&, 2, 0> : public true_type {};
721 template <typename T1>
722 struct is_convertible_impl<T1, T1 &, 2, 0> : public true_type {};
723 template <typename T1>
724 struct is_convertible_impl<T1, T1 *, 2, 0> : public true_type {};
725 template <typename T1>
726 struct is_convertible_impl<T1, T1 *const, 2, 0> : public true_type {};
727 template <typename T1>
728 struct is_convertible_impl<T1, T1 *volatile, 2, 0> : public true_type {};
729 template <typename T1>
730 struct is_convertible_impl<T1, T1 *const volatile, 2, 0> : public true_type {};
732 template <typename T1, typename T2>
733 struct is_convertible_impl<T1, T2, 3, 0> : public false_type {};
734 template <typename T1, typename T2>
735 struct is_convertible_impl<T1, T2, 0, 1> : public false_type {};
736 template <typename T1, typename T2>
737 struct is_convertible_impl<T1, T2, 1, 1> : public false_type {};
738 template <typename T1, typename T2>
739 struct is_convertible_impl<T1, T2, 2, 1> : public false_type {};
740 template <typename T1, typename T2>
741 struct is_convertible_impl<T1, T2, 3, 1> : public false_type {};
742 template <typename T1, typename T2>
743 struct is_convertible_impl<T1, T2, 0, 2> : public false_type {};
744 template <typename T1, typename T2>
745 struct is_convertible_impl<T1, T2, 1, 2> : public false_type {};
746 template <typename T1, typename T2>
747 struct is_convertible_impl<T1, T2, 2, 2> : public false_type {};
748 template <typename T1, typename T2>
749 struct is_convertible_impl<T1, T2, 3, 2> : public false_type {};
750 template <typename T1, typename T2>
751 struct is_convertible_impl<T1, T2, 0, 3> : public false_type {};
752 template <typename T1, typename T2>
753 struct is_convertible_impl<T1, T2, 1, 3> : public false_type {};
754 template <typename T1, typename T2>
755 struct is_convertible_impl<T1, T2, 3, 3> : public true_type {};
757 template <typename T1, typename T2> struct is_convertible :
758 public internal::is_convertible_impl<T1, T2> {};
768 template <typename T> struct remove_const {typedef T type;};
769 template <typename T> struct remove_const<const T> {typedef T type;};
770 #if VSMC_HAS_CXX11_ALIAS_TEMPLATES
771 template <typename T> using remove_const_t = typename remove_const<T>::type;
775 template <typename T> struct remove_volatile {typedef T type;};
776 template <typename T> struct remove_volatile<volatile T> {typedef T type;};
777 #if VSMC_HAS_CXX11_ALIAS_TEMPLATES
778 template <typename T> using remove_volatile_t =
779 typename remove_volatile<T>::type;
783 template <typename T> struct remove_cv
784 {typedef typename remove_volatile<typename remove_const<T>::type>::type type;};
785 #if VSMC_HAS_CXX11_ALIAS_TEMPLATES
786 template <typename T> using remove_cv_t = typename remove_cv<T>::type;
791 template <typename T, bool =
792 is_reference<T>::value || is_function<T>::value || is_const<T>::value>
793 struct add_const_impl {typedef T type;};
794 template <typename T>
795 struct add_const_impl<T, false> {typedef const T type;};
797 template <typename T> struct add_const
798 {typedef typename internal::add_const_impl<T>::type type;};
799 #if VSMC_HAS_CXX11_ALIAS_TEMPLATES
800 template <typename T> using add_const_t = typename add_const<T>::type;
805 template <typename T, bool =
806 is_reference<T>::value || is_function<T>::value || is_volatile<T>::value>
807 struct add_volatile_impl {typedef T type;};
808 template <typename T>
809 struct add_volatile_impl<T, false> {typedef volatile T type;};
811 template <typename T> struct add_volatile
812 {typedef typename internal::add_volatile_impl<T>::type type;};
813 #if VSMC_HAS_CXX11_ALIAS_TEMPLATES
814 template <typename T> using add_volatile_t = typename add_volatile<T>::type;
818 template <typename T> struct add_cv
819 {typedef typename add_volatile<typename add_const<T>::type>::type type;};
820 #if VSMC_HAS_CXX11_ALIAS_TEMPLATES
821 template <typename T> using add_cv_t = typename add_cv<T>::type;
832 template <typename T> struct remove_reference {typedef T type;};
833 template <typename T> struct remove_reference<T &> {typedef T type;};
834 #if VSMC_HAS_CXX11_RVALUE_REFERENCES
835 template <typename T> struct remove_reference<T &&> {typedef T type;};
837 #if VSMC_HAS_CXX11_ALIAS_TEMPLATES
838 template <typename T> using remove_reference_t =
839 typename remove_reference<T>::type;
843 template <typename T> struct add_lvalue_reference {typedef T & type;};
844 template <typename T> struct add_lvalue_reference<T &> {typedef T & type;};
845 template <> struct add_lvalue_reference<void>
846 {typedef void type;};
847 template <> struct add_lvalue_reference<const void>
848 {typedef const void type;};
849 template <> struct add_lvalue_reference<volatile void>
850 {typedef volatile void type;};
851 template <> struct add_lvalue_reference<const volatile void>
852 {typedef const volatile void type;};
853 #if VSMC_HAS_CXX11_ALIAS_TEMPLATES
854 template <typename T> using add_lvalue_reference_t =
855 typename add_lvalue_reference<T>::type;
859 #if VSMC_HAS_CXX11_RVALUE_REFERENCES
860 template <typename T> struct add_rvalue_reference {typedef T && type;};
861 template <> struct add_rvalue_reference<void>
862 {typedef void type;};
863 template <> struct add_rvalue_reference<const void>
864 {typedef const void type;};
865 template <> struct add_rvalue_reference<volatile void>
866 {typedef volatile void type;};
867 template <> struct add_rvalue_reference<const volatile void>
868 {typedef const volatile void type;};
869 #if VSMC_HAS_CXX11_ALIAS_TEMPLATES
870 template <typename T> using add_rvalue_reference_t =
871 typename add_rvalue_reference<T>::type;
883 template <typename T> struct remove_pointer {typedef T type;};
884 template <typename T> struct remove_pointer<T *> {typedef T type;};
885 template <typename T> struct remove_pointer<T *const> {typedef T type;};
886 template <typename T> struct remove_pointer<T *volatile> {typedef T type;};
887 template <typename T> struct remove_pointer<T *const volatile>
889 #if VSMC_HAS_CXX11_ALIAS_TEMPLATES
890 template <typename T> using remove_pointer_t =
891 typename remove_pointer<T>::type;
895 template <typename T> struct add_pointer
896 {typedef typename remove_reference<T>::type * type;};
897 #if VSMC_HAS_CXX11_ALIAS_TEMPLATES
898 template <typename T> using add_pointer_t = typename add_pointer<T>::type;
909 template <typename T, typename U,
910 bool = is_const<typename remove_reference<T>::type>::value,
911 bool = is_volatile<typename remove_reference<T>::type>::value>
913 template <typename T, typename U> struct apply_cv<T, U, true, true>
914 {typedef const volatile U type;};
915 template <typename T, typename U> struct apply_cv<T, U, true, false>
916 {typedef const U type;};
917 template <typename T, typename U> struct apply_cv<T, U, false, true>
918 {typedef volatile U type;};
919 template <typename T, typename U> struct apply_cv<T, U, false, false>
921 template <typename T, typename U> struct apply_cv<T &, U, true, true>
922 {typedef const volatile U & type;};
923 template <typename T, typename U> struct apply_cv<T &, U, true, false>
924 {typedef const U & type;};
925 template <typename T, typename U> struct apply_cv<T &, U, false, true>
926 {typedef volatile U & type;};
927 template <typename T, typename U> struct apply_cv<T &, U, false, false>
929 #if VSMC_HAS_CXX11_RVALUE_REFERENCES
930 template <typename T, typename U> struct apply_cv<T &&, U, true, true>
931 {typedef const volatile U && type;};
932 template <typename T, typename U> struct apply_cv<T &&, U, true, false>
933 {typedef const U && type;};
934 template <typename T, typename U> struct apply_cv<T &&, U, false, true>
935 {typedef volatile U && type;};
936 template <typename T, typename U> struct apply_cv<T &&, U, false, false>
937 {typedef U && type;};
943 template <typename T, bool = is_integral<T>::value || is_enum<T>::value>
944 struct make_signed_impl {};
945 template <> struct make_signed_impl<signed short, true>
946 {typedef signed short type;};
947 template <> struct make_signed_impl<signed int, true>
948 {typedef signed int type;};
949 template <> struct make_signed_impl<signed long, true>
950 {typedef signed long type;};
951 #if VSMC_HAS_CXX11_LONG_LONG
952 template <> struct make_signed_impl<signed long long, true>
953 {typedef signed long long type;};
955 template <> struct make_signed_impl<unsigned short, true>
956 {typedef signed short type;};
957 template <> struct make_signed_impl<unsigned int, true>
958 {typedef signed int type;};
959 template <> struct make_signed_impl<unsigned long, true>
960 {typedef signed long type;};
961 #if VSMC_HAS_CXX11_LONG_LONG
962 template <> struct make_signed_impl<unsigned long long, true>
963 {typedef signed long long type;};
966 template <typename T>
969 typedef typename internal::apply_cv<T,
970 typename internal::make_signed_impl<typename remove_cv<
971 typename remove_reference<T>::type>::type>::type>::type type;
973 #if VSMC_HAS_CXX11_ALIAS_TEMPLATES
974 template <typename T> using make_signed_t = typename make_signed<T>::type;
979 template <typename T, bool = is_integral<T>::value || is_enum<T>::value>
980 struct make_unsigned_impl {};
981 template <> struct make_unsigned_impl<signed short, true>
982 {typedef unsigned short type;};
983 template <> struct make_unsigned_impl<signed int, true>
984 {typedef unsigned int type;};
985 template <> struct make_unsigned_impl<signed long, true>
986 {typedef unsigned long type;};
987 #if VSMC_HAS_CXX11_LONG_LONG
988 template <> struct make_unsigned_impl<signed long long, true>
989 {typedef unsigned long long type;};
991 template <> struct make_unsigned_impl<unsigned short, true>
992 {typedef unsigned short type;};
993 template <> struct make_unsigned_impl<unsigned int, true>
994 {typedef unsigned int type;};
995 template <> struct make_unsigned_impl<unsigned long, true>
996 {typedef unsigned long type;};
997 #if VSMC_HAS_CXX11_LONG_LONG
998 template <> struct make_unsigned_impl<unsigned long long, true>
999 {typedef unsigned long long type;};
1002 template <typename T>
1003 struct make_unsigned
1005 typedef typename internal::apply_cv<T,
1006 typename internal::make_unsigned_impl<typename remove_cv<
1007 typename remove_reference<T>::type>::type>::type>::type type;
1009 #if VSMC_HAS_CXX11_ALIAS_TEMPLATES
1010 template <typename T> using make_unsigned_t = typename make_unsigned<T>::type;
1021 template <typename T>
1022 struct remove_extent {typedef T type;};
1023 template <typename T>
1024 struct remove_extent<T []> {typedef T type;};
1025 template <typename T, std::size_t N>
1026 struct remove_extent<T [N]> {typedef T type;};
1027 #if VSMC_HAS_CXX11_ALIAS_TEMPLATES
1028 template <typename T> using remove_extent_t = typename remove_extent<T>::type;
1032 template <typename T> struct remove_all_extents {typedef T type;};
1033 template <typename T> struct remove_all_extents<T []>
1034 {typedef typename remove_all_extents<T>::type type;};
1035 template <typename T, std::size_t N> struct remove_all_extents<T [N]>
1036 {typedef typename remove_all_extents<T>::type type;};
1037 #if VSMC_HAS_CXX11_ALIAS_TEMPLATES
1038 template <typename T> using remove_all_extents_t =
1039 typename remove_all_extents<T>::type;
1053 template <typename T>
1058 typedef typename remove_reference<T>::type U;
1063 typename conditional<
1064 is_array<U>::value, typename remove_extent<U>::type *,
1065 typename conditional<
1066 is_function<U>::value, typename add_pointer<U>::type,
1067 typename remove_cv<U>::type>::type>::type type;
1069 #if VSMC_HAS_CXX11_ALIAS_TEMPLATES
1070 template <typename T> using decay_t = typename decay<T>::type;
1074 template <bool, typename = void> struct enable_if {};
1075 template <typename T> struct enable_if<true, T> {typedef T type;};
1076 #if VSMC_HAS_CXX11_ALIAS_TEMPLATES
1077 template <bool B, typename T = void> using enable_if_t =
1078 typename enable_if<B, T>::type;
1082 template <bool, typename, typename F> struct conditional {typedef F type;};
1083 template <typename T, typename F> struct conditional<true, T, F>
1085 #if VSMC_HAS_CXX11_ALIAS_TEMPLATES
1086 template <bool B, typename T, typename F> using conditional_t =
1087 typename conditional<B, T, F>::type;
1105 #if VSMC_HAS_CXX11_RVALUE_REFERENCES
1106 template <typename T>
1107 inline typename remove_reference<T>::type &&move (T &&t) VSMC_NOEXCEPT;
1109 template <typename T>
1110 inline typename remove_reference<T>::type &&move (T &&t) VSMC_NOEXCEPT
1112 typedef typename remove_reference<T>::type U;
1113 return static_cast<U &&>(t);
1116 template <typename T>
1117 inline T &&forward (typename remove_reference<T>::type &t) VSMC_NOEXCEPT
1118 {return static_cast<T &&>(t);}
1120 template <typename T>
1121 inline T &&forward (typename remove_reference<T>::type &&t) VSMC_NOEXCEPT
1123 VSMC_STATIC_ASSERT_CXX11_TYPE_TRATIS_FORWARD_RVALUE;
1124 return static_cast<T&&>(t);
constexpr value_type operator()() const noexcept
#define VSMC_CONSTEXPR
constexpr
T & is_function_test_src()
tp_test_false is_class_test(...)
tp_test_false is_function_test(...)
integral_constant< bool, false > false_type
integral_constant< T, v > type
add_rvalue_reference< T >::type declval() noexcept
integral_constant< bool, true > true_type
tp_test_false is_polymorphic_test(...)
static constexpr const T value
#define VSMC_NOEXCEPT
noexcept
tp_test_false is_abstract_test(T(*)[1])