summaryrefslogtreecommitdiffstats
path: root/contrib/libc++/include/type_traits
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/libc++/include/type_traits')
-rw-r--r--contrib/libc++/include/type_traits480
1 files changed, 264 insertions, 216 deletions
diff --git a/contrib/libc++/include/type_traits b/contrib/libc++/include/type_traits
index a8730ec..a97441d 100644
--- a/contrib/libc++/include/type_traits
+++ b/contrib/libc++/include/type_traits
@@ -28,6 +28,7 @@ namespace std
// Primary classification traits:
template <class T> struct is_void;
+ template <class T> struct is_null_pointer; // C++14
template <class T> struct is_integral;
template <class T> struct is_floating_point;
template <class T> struct is_array;
@@ -208,16 +209,16 @@ namespace std
_LIBCPP_BEGIN_NAMESPACE_STD
template <bool _Bp, class _If, class _Then>
- struct _LIBCPP_TYPE_VIS conditional {typedef _If type;};
+ struct _LIBCPP_TYPE_VIS_ONLY conditional {typedef _If type;};
template <class _If, class _Then>
- struct _LIBCPP_TYPE_VIS conditional<false, _If, _Then> {typedef _Then type;};
+ struct _LIBCPP_TYPE_VIS_ONLY conditional<false, _If, _Then> {typedef _Then type;};
#if _LIBCPP_STD_VER > 11
template <bool _Bp, class _If, class _Then> using conditional_t = typename conditional<_Bp, _If, _Then>::type;
#endif
-template <bool, class _Tp = void> struct _LIBCPP_TYPE_VIS enable_if {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS enable_if<true, _Tp> {typedef _Tp type;};
+template <bool, class _Tp = void> struct _LIBCPP_TYPE_VIS_ONLY enable_if {};
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY enable_if<true, _Tp> {typedef _Tp type;};
#if _LIBCPP_STD_VER > 11
template <bool _Bp, class _Tp = void> using enable_if_t = typename enable_if<_Bp, _Tp>::type;
@@ -229,13 +230,17 @@ struct __two {char __lx[2];};
// helper class:
template <class _Tp, _Tp __v>
-struct _LIBCPP_TYPE_VIS integral_constant
+struct _LIBCPP_TYPE_VIS_ONLY integral_constant
{
static _LIBCPP_CONSTEXPR const _Tp value = __v;
typedef _Tp value_type;
typedef integral_constant type;
_LIBCPP_INLINE_VISIBILITY
_LIBCPP_CONSTEXPR operator value_type() const {return value;}
+#if _LIBCPP_STD_VER > 11
+ _LIBCPP_INLINE_VISIBILITY
+ constexpr value_type operator ()() const {return value;}
+#endif
};
template <class _Tp, _Tp __v>
@@ -246,33 +251,33 @@ typedef integral_constant<bool, false> false_type;
// is_const
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_const : public false_type {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_const<_Tp const> : public true_type {};
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_const : public false_type {};
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_const<_Tp const> : public true_type {};
// is_volatile
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_volatile : public false_type {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_volatile<_Tp volatile> : public true_type {};
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_volatile : public false_type {};
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_volatile<_Tp volatile> : public true_type {};
// remove_const
-template <class _Tp> struct _LIBCPP_TYPE_VIS remove_const {typedef _Tp type;};
-template <class _Tp> struct _LIBCPP_TYPE_VIS remove_const<const _Tp> {typedef _Tp type;};
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_const {typedef _Tp type;};
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_const<const _Tp> {typedef _Tp type;};
#if _LIBCPP_STD_VER > 11
template <class _Tp> using remove_const_t = typename remove_const<_Tp>::type;
#endif
// remove_volatile
-template <class _Tp> struct _LIBCPP_TYPE_VIS remove_volatile {typedef _Tp type;};
-template <class _Tp> struct _LIBCPP_TYPE_VIS remove_volatile<volatile _Tp> {typedef _Tp type;};
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_volatile {typedef _Tp type;};
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_volatile<volatile _Tp> {typedef _Tp type;};
#if _LIBCPP_STD_VER > 11
template <class _Tp> using remove_volatile_t = typename remove_volatile<_Tp>::type;
#endif
// remove_cv
-template <class _Tp> struct _LIBCPP_TYPE_VIS remove_cv
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_cv
{typedef typename remove_volatile<typename remove_const<_Tp>::type>::type type;};
#if _LIBCPP_STD_VER > 11
template <class _Tp> using remove_cv_t = typename remove_cv<_Tp>::type;
@@ -283,7 +288,7 @@ template <class _Tp> using remove_cv_t = typename remove_cv<_Tp>::type;
template <class _Tp> struct __libcpp_is_void : public false_type {};
template <> struct __libcpp_is_void<void> : public true_type {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_void
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_void
: public __libcpp_is_void<typename remove_cv<_Tp>::type> {};
// __is_nullptr_t
@@ -291,9 +296,14 @@ template <class _Tp> struct _LIBCPP_TYPE_VIS is_void
template <class _Tp> struct __libcpp___is_nullptr : public false_type {};
template <> struct __libcpp___is_nullptr<nullptr_t> : public true_type {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS __is_nullptr_t
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY __is_nullptr_t
: public __libcpp___is_nullptr<typename remove_cv<_Tp>::type> {};
+#if _LIBCPP_STD_VER > 11
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_null_pointer
+ : public ____is_nullptr_t<typename remove_cv<_Tp>::type> {};
+#endif
+
// is_integral
template <class _Tp> struct __libcpp_is_integral : public false_type {};
@@ -315,7 +325,7 @@ template <> struct __libcpp_is_integral<unsigned long> : public tr
template <> struct __libcpp_is_integral<long long> : public true_type {};
template <> struct __libcpp_is_integral<unsigned long long> : public true_type {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_integral
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_integral
: public __libcpp_is_integral<typename remove_cv<_Tp>::type> {};
// is_floating_point
@@ -325,16 +335,16 @@ template <> struct __libcpp_is_floating_point<float> : public tru
template <> struct __libcpp_is_floating_point<double> : public true_type {};
template <> struct __libcpp_is_floating_point<long double> : public true_type {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_floating_point
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_floating_point
: public __libcpp_is_floating_point<typename remove_cv<_Tp>::type> {};
// is_array
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_array
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_array
: public false_type {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_array<_Tp[]>
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_array<_Tp[]>
: public true_type {};
-template <class _Tp, size_t _Np> struct _LIBCPP_TYPE_VIS is_array<_Tp[_Np]>
+template <class _Tp, size_t _Np> struct _LIBCPP_TYPE_VIS_ONLY is_array<_Tp[_Np]>
: public true_type {};
// is_pointer
@@ -342,23 +352,23 @@ template <class _Tp, size_t _Np> struct _LIBCPP_TYPE_VIS is_array<_Tp[_Np]>
template <class _Tp> struct __libcpp_is_pointer : public false_type {};
template <class _Tp> struct __libcpp_is_pointer<_Tp*> : public true_type {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_pointer
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_pointer
: public __libcpp_is_pointer<typename remove_cv<_Tp>::type> {};
// is_reference
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_lvalue_reference : public false_type {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_lvalue_reference<_Tp&> : public true_type {};
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_lvalue_reference : public false_type {};
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_lvalue_reference<_Tp&> : public true_type {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_rvalue_reference : public false_type {};
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_rvalue_reference : public false_type {};
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_rvalue_reference<_Tp&&> : public true_type {};
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_rvalue_reference<_Tp&&> : public true_type {};
#endif
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_reference : public false_type {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_reference<_Tp&> : public true_type {};
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_reference : public false_type {};
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_reference<_Tp&> : public true_type {};
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_reference<_Tp&&> : public true_type {};
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_reference<_Tp&&> : public true_type {};
#endif
#if defined(__clang__) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
@@ -369,13 +379,13 @@ template <class _Tp> struct _LIBCPP_TYPE_VIS is_reference<_Tp&&> : public true_t
#if __has_feature(is_union) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_union
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_union
: public integral_constant<bool, __is_union(_Tp)> {};
#else
template <class _Tp> struct __libcpp_union : public false_type {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_union
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_union
: public __libcpp_union<typename remove_cv<_Tp>::type> {};
#endif
@@ -384,7 +394,7 @@ template <class _Tp> struct _LIBCPP_TYPE_VIS is_union
#if __has_feature(is_class) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_class
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_class
: public integral_constant<bool, __is_class(_Tp)> {};
#else
@@ -395,15 +405,15 @@ template <class _Tp> char __test(int _Tp::*);
template <class _Tp> __two __test(...);
}
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_class
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_class
: public integral_constant<bool, sizeof(__is_class_imp::__test<_Tp>(0)) == 1 && !is_union<_Tp>::value> {};
#endif
// is_same
-template <class _Tp, class _Up> struct _LIBCPP_TYPE_VIS is_same : public false_type {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_same<_Tp, _Tp> : public true_type {};
+template <class _Tp, class _Up> struct _LIBCPP_TYPE_VIS_ONLY is_same : public false_type {};
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_same<_Tp, _Tp> : public true_type {};
// is_function
@@ -418,13 +428,13 @@ template <class _Tp, bool = is_class<_Tp>::value ||
is_union<_Tp>::value ||
is_void<_Tp>::value ||
is_reference<_Tp>::value ||
- is_same<_Tp, nullptr_t>::value >
+ __is_nullptr_t<_Tp>::value >
struct __libcpp_is_function
: public integral_constant<bool, sizeof(__is_function_imp::__test<_Tp>(__is_function_imp::__source<_Tp>())) == 1>
{};
template <class _Tp> struct __libcpp_is_function<_Tp, true> : public false_type {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_function
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_function
: public __libcpp_is_function<_Tp> {};
// is_member_function_pointer
@@ -432,7 +442,7 @@ template <class _Tp> struct _LIBCPP_TYPE_VIS is_function
template <class _Tp> struct __libcpp_is_member_function_pointer : public false_type {};
template <class _Tp, class _Up> struct __libcpp_is_member_function_pointer<_Tp _Up::*> : public is_function<_Tp> {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_member_function_pointer
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_member_function_pointer
: public __libcpp_is_member_function_pointer<typename remove_cv<_Tp>::type> {};
// is_member_pointer
@@ -440,12 +450,12 @@ template <class _Tp> struct _LIBCPP_TYPE_VIS is_member_function_pointer
template <class _Tp> struct __libcpp_is_member_pointer : public false_type {};
template <class _Tp, class _Up> struct __libcpp_is_member_pointer<_Tp _Up::*> : public true_type {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_member_pointer
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_member_pointer
: public __libcpp_is_member_pointer<typename remove_cv<_Tp>::type> {};
// is_member_object_pointer
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_member_object_pointer
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_member_object_pointer
: public integral_constant<bool, is_member_pointer<_Tp>::value &&
!is_member_function_pointer<_Tp>::value> {};
@@ -453,12 +463,12 @@ template <class _Tp> struct _LIBCPP_TYPE_VIS is_member_object_pointer
#if __has_feature(is_enum) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_enum
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_enum
: public integral_constant<bool, __is_enum(_Tp)> {};
#else
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_enum
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_enum
: public integral_constant<bool, !is_void<_Tp>::value &&
!is_integral<_Tp>::value &&
!is_floating_point<_Tp>::value &&
@@ -474,31 +484,31 @@ template <class _Tp> struct _LIBCPP_TYPE_VIS is_enum
// is_arithmetic
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_arithmetic
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_arithmetic
: public integral_constant<bool, is_integral<_Tp>::value ||
is_floating_point<_Tp>::value> {};
// is_fundamental
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_fundamental
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_fundamental
: public integral_constant<bool, is_void<_Tp>::value ||
__is_nullptr_t<_Tp>::value ||
is_arithmetic<_Tp>::value> {};
// is_scalar
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_scalar
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_scalar
: public integral_constant<bool, is_arithmetic<_Tp>::value ||
is_member_pointer<_Tp>::value ||
is_pointer<_Tp>::value ||
__is_nullptr_t<_Tp>::value ||
is_enum<_Tp>::value > {};
-template <> struct _LIBCPP_TYPE_VIS is_scalar<nullptr_t> : public true_type {};
+template <> struct _LIBCPP_TYPE_VIS_ONLY is_scalar<nullptr_t> : public true_type {};
// is_object
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_object
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_object
: public integral_constant<bool, is_scalar<_Tp>::value ||
is_array<_Tp>::value ||
is_union<_Tp>::value ||
@@ -506,7 +516,7 @@ template <class _Tp> struct _LIBCPP_TYPE_VIS is_object
// is_compound
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_compound
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_compound
: public integral_constant<bool, !is_fundamental<_Tp>::value> {};
// add_const
@@ -519,7 +529,7 @@ struct __add_const {typedef _Tp type;};
template <class _Tp>
struct __add_const<_Tp, false> {typedef const _Tp type;};
-template <class _Tp> struct _LIBCPP_TYPE_VIS add_const
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY add_const
{typedef typename __add_const<_Tp>::type type;};
#if _LIBCPP_STD_VER > 11
@@ -536,7 +546,7 @@ struct __add_volatile {typedef _Tp type;};
template <class _Tp>
struct __add_volatile<_Tp, false> {typedef volatile _Tp type;};
-template <class _Tp> struct _LIBCPP_TYPE_VIS add_volatile
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY add_volatile
{typedef typename __add_volatile<_Tp>::type type;};
#if _LIBCPP_STD_VER > 11
@@ -545,7 +555,7 @@ template <class _Tp> using add_volatile_t = typename add_volatile<_Tp>::type;
// add_cv
-template <class _Tp> struct _LIBCPP_TYPE_VIS add_cv
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY add_cv
{typedef typename add_const<typename add_volatile<_Tp>::type>::type type;};
#if _LIBCPP_STD_VER > 11
@@ -554,10 +564,10 @@ template <class _Tp> using add_cv_t = typename add_cv<_Tp>::type;
// remove_reference
-template <class _Tp> struct _LIBCPP_TYPE_VIS remove_reference {typedef _Tp type;};
-template <class _Tp> struct _LIBCPP_TYPE_VIS remove_reference<_Tp&> {typedef _Tp type;};
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_reference {typedef _Tp type;};
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_reference<_Tp&> {typedef _Tp type;};
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-template <class _Tp> struct _LIBCPP_TYPE_VIS remove_reference<_Tp&&> {typedef _Tp type;};
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_reference<_Tp&&> {typedef _Tp type;};
#endif
#if _LIBCPP_STD_VER > 11
@@ -566,12 +576,12 @@ template <class _Tp> using remove_reference_t = typename remove_reference<_Tp>::
// add_lvalue_reference
-template <class _Tp> struct _LIBCPP_TYPE_VIS add_lvalue_reference {typedef _Tp& type;};
-template <class _Tp> struct _LIBCPP_TYPE_VIS add_lvalue_reference<_Tp&> {typedef _Tp& type;}; // for older compiler
-template <> struct _LIBCPP_TYPE_VIS add_lvalue_reference<void> {typedef void type;};
-template <> struct _LIBCPP_TYPE_VIS add_lvalue_reference<const void> {typedef const void type;};
-template <> struct _LIBCPP_TYPE_VIS add_lvalue_reference<volatile void> {typedef volatile void type;};
-template <> struct _LIBCPP_TYPE_VIS add_lvalue_reference<const volatile void> {typedef const volatile void type;};
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY add_lvalue_reference {typedef _Tp& type;};
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY add_lvalue_reference<_Tp&> {typedef _Tp& type;}; // for older compiler
+template <> struct _LIBCPP_TYPE_VIS_ONLY add_lvalue_reference<void> {typedef void type;};
+template <> struct _LIBCPP_TYPE_VIS_ONLY add_lvalue_reference<const void> {typedef const void type;};
+template <> struct _LIBCPP_TYPE_VIS_ONLY add_lvalue_reference<volatile void> {typedef volatile void type;};
+template <> struct _LIBCPP_TYPE_VIS_ONLY add_lvalue_reference<const volatile void> {typedef const volatile void type;};
#if _LIBCPP_STD_VER > 11
template <class _Tp> using add_lvalue_reference_t = typename add_lvalue_reference<_Tp>::type;
@@ -579,11 +589,11 @@ template <class _Tp> using add_lvalue_reference_t = typename add_lvalue_referenc
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-template <class _Tp> struct _LIBCPP_TYPE_VIS add_rvalue_reference {typedef _Tp&& type;};
-template <> struct _LIBCPP_TYPE_VIS add_rvalue_reference<void> {typedef void type;};
-template <> struct _LIBCPP_TYPE_VIS add_rvalue_reference<const void> {typedef const void type;};
-template <> struct _LIBCPP_TYPE_VIS add_rvalue_reference<volatile void> {typedef volatile void type;};
-template <> struct _LIBCPP_TYPE_VIS add_rvalue_reference<const volatile void> {typedef const volatile void type;};
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY add_rvalue_reference {typedef _Tp&& type;};
+template <> struct _LIBCPP_TYPE_VIS_ONLY add_rvalue_reference<void> {typedef void type;};
+template <> struct _LIBCPP_TYPE_VIS_ONLY add_rvalue_reference<const void> {typedef const void type;};
+template <> struct _LIBCPP_TYPE_VIS_ONLY add_rvalue_reference<volatile void> {typedef volatile void type;};
+template <> struct _LIBCPP_TYPE_VIS_ONLY add_rvalue_reference<const volatile void> {typedef const volatile void type;};
#if _LIBCPP_STD_VER > 11
template <class _Tp> using add_rvalue_reference_t = typename add_rvalue_reference<_Tp>::type;
@@ -612,11 +622,11 @@ struct __any
// remove_pointer
-template <class _Tp> struct _LIBCPP_TYPE_VIS remove_pointer {typedef _Tp type;};
-template <class _Tp> struct _LIBCPP_TYPE_VIS remove_pointer<_Tp*> {typedef _Tp type;};
-template <class _Tp> struct _LIBCPP_TYPE_VIS remove_pointer<_Tp* const> {typedef _Tp type;};
-template <class _Tp> struct _LIBCPP_TYPE_VIS remove_pointer<_Tp* volatile> {typedef _Tp type;};
-template <class _Tp> struct _LIBCPP_TYPE_VIS remove_pointer<_Tp* const volatile> {typedef _Tp type;};
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_pointer {typedef _Tp type;};
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_pointer<_Tp*> {typedef _Tp type;};
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_pointer<_Tp* const> {typedef _Tp type;};
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_pointer<_Tp* volatile> {typedef _Tp type;};
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_pointer<_Tp* const volatile> {typedef _Tp type;};
#if _LIBCPP_STD_VER > 11
template <class _Tp> using remove_pointer_t = typename remove_pointer<_Tp>::type;
@@ -624,7 +634,7 @@ template <class _Tp> using remove_pointer_t = typename remove_pointer<_Tp>::type
// add_pointer
-template <class _Tp> struct _LIBCPP_TYPE_VIS add_pointer
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY add_pointer
{typedef typename remove_reference<_Tp>::type* type;};
#if _LIBCPP_STD_VER > 11
@@ -644,7 +654,7 @@ struct __libcpp_is_signed : public ___is_signed<_Tp> {};
template <class _Tp> struct __libcpp_is_signed<_Tp, false> : public false_type {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_signed : public __libcpp_is_signed<_Tp> {};
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_signed : public __libcpp_is_signed<_Tp> {};
// is_unsigned
@@ -659,37 +669,37 @@ struct __libcpp_is_unsigned : public ___is_unsigned<_Tp> {};
template <class _Tp> struct __libcpp_is_unsigned<_Tp, false> : public false_type {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_unsigned : public __libcpp_is_unsigned<_Tp> {};
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_unsigned : public __libcpp_is_unsigned<_Tp> {};
// rank
-template <class _Tp> struct _LIBCPP_TYPE_VIS rank
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY rank
: public integral_constant<size_t, 0> {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS rank<_Tp[]>
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY rank<_Tp[]>
: public integral_constant<size_t, rank<_Tp>::value + 1> {};
-template <class _Tp, size_t _Np> struct _LIBCPP_TYPE_VIS rank<_Tp[_Np]>
+template <class _Tp, size_t _Np> struct _LIBCPP_TYPE_VIS_ONLY rank<_Tp[_Np]>
: public integral_constant<size_t, rank<_Tp>::value + 1> {};
// extent
-template <class _Tp, unsigned _Ip = 0> struct _LIBCPP_TYPE_VIS extent
+template <class _Tp, unsigned _Ip = 0> struct _LIBCPP_TYPE_VIS_ONLY extent
: public integral_constant<size_t, 0> {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS extent<_Tp[], 0>
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY extent<_Tp[], 0>
: public integral_constant<size_t, 0> {};
-template <class _Tp, unsigned _Ip> struct _LIBCPP_TYPE_VIS extent<_Tp[], _Ip>
+template <class _Tp, unsigned _Ip> struct _LIBCPP_TYPE_VIS_ONLY extent<_Tp[], _Ip>
: public integral_constant<size_t, extent<_Tp, _Ip-1>::value> {};
-template <class _Tp, size_t _Np> struct _LIBCPP_TYPE_VIS extent<_Tp[_Np], 0>
+template <class _Tp, size_t _Np> struct _LIBCPP_TYPE_VIS_ONLY extent<_Tp[_Np], 0>
: public integral_constant<size_t, _Np> {};
-template <class _Tp, size_t _Np, unsigned _Ip> struct _LIBCPP_TYPE_VIS extent<_Tp[_Np], _Ip>
+template <class _Tp, size_t _Np, unsigned _Ip> struct _LIBCPP_TYPE_VIS_ONLY extent<_Tp[_Np], _Ip>
: public integral_constant<size_t, extent<_Tp, _Ip-1>::value> {};
// remove_extent
-template <class _Tp> struct _LIBCPP_TYPE_VIS remove_extent
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_extent
{typedef _Tp type;};
-template <class _Tp> struct _LIBCPP_TYPE_VIS remove_extent<_Tp[]>
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_extent<_Tp[]>
{typedef _Tp type;};
-template <class _Tp, size_t _Np> struct _LIBCPP_TYPE_VIS remove_extent<_Tp[_Np]>
+template <class _Tp, size_t _Np> struct _LIBCPP_TYPE_VIS_ONLY remove_extent<_Tp[_Np]>
{typedef _Tp type;};
#if _LIBCPP_STD_VER > 11
@@ -698,17 +708,42 @@ template <class _Tp> using remove_extent_t = typename remove_extent<_Tp>::type;
// remove_all_extents
-template <class _Tp> struct _LIBCPP_TYPE_VIS remove_all_extents
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_all_extents
{typedef _Tp type;};
-template <class _Tp> struct _LIBCPP_TYPE_VIS remove_all_extents<_Tp[]>
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_all_extents<_Tp[]>
{typedef typename remove_all_extents<_Tp>::type type;};
-template <class _Tp, size_t _Np> struct _LIBCPP_TYPE_VIS remove_all_extents<_Tp[_Np]>
+template <class _Tp, size_t _Np> struct _LIBCPP_TYPE_VIS_ONLY remove_all_extents<_Tp[_Np]>
{typedef typename remove_all_extents<_Tp>::type type;};
#if _LIBCPP_STD_VER > 11
template <class _Tp> using remove_all_extents_t = typename remove_all_extents<_Tp>::type;
#endif
+// decay
+
+template <class _Tp>
+struct _LIBCPP_TYPE_VIS_ONLY decay
+{
+private:
+ typedef typename remove_reference<_Tp>::type _Up;
+public:
+ typedef typename conditional
+ <
+ is_array<_Up>::value,
+ typename remove_extent<_Up>::type*,
+ typename conditional
+ <
+ is_function<_Up>::value,
+ typename add_pointer<_Up>::type,
+ typename remove_cv<_Up>::type
+ >::type
+ >::type type;
+};
+
+#if _LIBCPP_STD_VER > 11
+template <class _Tp> using decay_t = typename decay<_Tp>::type;
+#endif
+
// is_abstract
namespace __is_abstract_imp
@@ -722,14 +757,14 @@ struct __libcpp_abstract : public integral_constant<bool, sizeof(__is_abstract_i
template <class _Tp> struct __libcpp_abstract<_Tp, false> : public false_type {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_abstract : public __libcpp_abstract<_Tp> {};
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_abstract : public __libcpp_abstract<_Tp> {};
// is_base_of
-#ifdef _LIBCP_HAS_IS_BASE_OF
+#ifdef _LIBCPP_HAS_IS_BASE_OF
template <class _Bp, class _Dp>
-struct _LIBCPP_TYPE_VIS is_base_of
+struct _LIBCPP_TYPE_VIS_ONLY is_base_of
: public integral_constant<bool, __is_base_of(_Bp, _Dp)> {};
#else // __has_feature(is_base_of)
@@ -753,7 +788,7 @@ template <class _Bp, class _Dp> __two __test(...);
}
template <class _Bp, class _Dp>
-struct _LIBCPP_TYPE_VIS is_base_of
+struct _LIBCPP_TYPE_VIS_ONLY is_base_of
: public integral_constant<bool, is_class<_Bp>::value &&
sizeof(__is_base_of_imp::__test<_Bp, _Dp>(0)) == 2> {};
@@ -763,7 +798,7 @@ struct _LIBCPP_TYPE_VIS is_base_of
#if __has_feature(is_convertible_to)
-template <class _T1, class _T2> struct _LIBCPP_TYPE_VIS is_convertible
+template <class _T1, class _T2> struct _LIBCPP_TYPE_VIS_ONLY is_convertible
: public integral_constant<bool, __is_convertible_to(_T1, _T2) &&
!is_abstract<_T2>::value> {};
@@ -869,7 +904,7 @@ template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 1, 3> : public
template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 2, 3> : public false_type {};
template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 3, 3> : public true_type {};
-template <class _T1, class _T2> struct _LIBCPP_TYPE_VIS is_convertible
+template <class _T1, class _T2> struct _LIBCPP_TYPE_VIS_ONLY is_convertible
: public __is_convertible<_T1, _T2>
{
static const size_t __complete_check1 = __is_convertible_check<_T1>::__v;
@@ -883,7 +918,7 @@ template <class _T1, class _T2> struct _LIBCPP_TYPE_VIS is_convertible
#if __has_feature(is_empty)
template <class _Tp>
-struct _LIBCPP_TYPE_VIS is_empty
+struct _LIBCPP_TYPE_VIS_ONLY is_empty
: public integral_constant<bool, __is_empty(_Tp)> {};
#else // __has_feature(is_empty)
@@ -905,7 +940,7 @@ struct __libcpp_empty : public integral_constant<bool, sizeof(__is_empty1<_Tp>)
template <class _Tp> struct __libcpp_empty<_Tp, false> : public false_type {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_empty : public __libcpp_empty<_Tp> {};
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_empty : public __libcpp_empty<_Tp> {};
#endif // __has_feature(is_empty)
@@ -914,7 +949,7 @@ template <class _Tp> struct _LIBCPP_TYPE_VIS is_empty : public __libcpp_empty<_T
#if __has_feature(is_polymorphic)
template <class _Tp>
-struct _LIBCPP_TYPE_VIS is_polymorphic
+struct _LIBCPP_TYPE_VIS_ONLY is_polymorphic
: public integral_constant<bool, __is_polymorphic(_Tp)> {};
#else
@@ -924,7 +959,7 @@ template<typename _Tp> char &__is_polymorphic_impl(
int>::type);
template<typename _Tp> __two &__is_polymorphic_impl(...);
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_polymorphic
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_polymorphic
: public integral_constant<bool, sizeof(__is_polymorphic_impl<_Tp>(0)) == 1> {};
#endif // __has_feature(is_polymorphic)
@@ -933,19 +968,19 @@ template <class _Tp> struct _LIBCPP_TYPE_VIS is_polymorphic
#if __has_feature(has_virtual_destructor) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
-template <class _Tp> struct _LIBCPP_TYPE_VIS has_virtual_destructor
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY has_virtual_destructor
: public integral_constant<bool, __has_virtual_destructor(_Tp)> {};
#else // _LIBCPP_HAS_TYPE_TRAITS
-template <class _Tp> struct _LIBCPP_TYPE_VIS has_virtual_destructor
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY has_virtual_destructor
: public false_type {};
#endif // _LIBCPP_HAS_TYPE_TRAITS
// alignment_of
-template <class _Tp> struct _LIBCPP_TYPE_VIS alignment_of
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY alignment_of
: public integral_constant<size_t, __alignof__(_Tp)> {};
// aligned_storage
@@ -1033,7 +1068,7 @@ struct __find_max_align<__type_list<_Hp, _Tp>, _Len>
: public integral_constant<size_t, __select_align<_Len, _Hp::value, __find_max_align<_Tp, _Len>::value>::value> {};
template <size_t _Len, size_t _Align = __find_max_align<__all_types, _Len>::value>
-struct _LIBCPP_TYPE_VIS aligned_storage
+struct _LIBCPP_TYPE_VIS_ONLY aligned_storage
{
typedef typename __find_pod<__all_types, _Align>::type _Aligner;
static_assert(!is_void<_Aligner>::value, "");
@@ -1051,7 +1086,7 @@ template <size_t _Len, size_t _Align = __find_max_align<__all_types, _Len>::valu
#define _CREATE_ALIGNED_STORAGE_SPECIALIZATION(n) \
template <size_t _Len>\
-struct _LIBCPP_TYPE_VIS aligned_storage<_Len, n>\
+struct _LIBCPP_TYPE_VIS_ONLY aligned_storage<_Len, n>\
{\
struct _ALIGNAS(n) type\
{\
@@ -1074,9 +1109,9 @@ _CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x800);
_CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x1000);
_CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x2000);
// MSDN says that MSVC does not support alignment beyond 8192 (=0x2000)
-#if !defined(_MSC_VER)
+#if !defined(_LIBCPP_MSVC)
_CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x4000);
-#endif // !_MSC_VER
+#endif // !_LIBCPP_MSVC
#undef _CREATE_ALIGNED_STORAGE_SPECIALIZATION
@@ -1270,7 +1305,7 @@ template <> struct __make_signed< signed long long, true> {typedef long long ty
template <> struct __make_signed<unsigned long long, true> {typedef long long type;};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS make_signed
+struct _LIBCPP_TYPE_VIS_ONLY make_signed
{
typedef typename __apply_cv<_Tp, typename __make_signed<typename remove_cv<_Tp>::type>::type>::type type;
};
@@ -1299,7 +1334,7 @@ template <> struct __make_unsigned< signed long long, true> {typedef unsigned l
template <> struct __make_unsigned<unsigned long long, true> {typedef unsigned long long type;};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS make_unsigned
+struct _LIBCPP_TYPE_VIS_ONLY make_unsigned
{
typedef typename __apply_cv<_Tp, typename __make_unsigned<typename remove_cv<_Tp>::type>::type>::type type;
};
@@ -1311,21 +1346,21 @@ template <class _Tp> using make_unsigned_t = typename make_unsigned<_Tp>::type;
#ifdef _LIBCPP_HAS_NO_VARIADICS
template <class _Tp, class _Up = void, class V = void>
-struct _LIBCPP_TYPE_VIS common_type
+struct _LIBCPP_TYPE_VIS_ONLY common_type
{
public:
typedef typename common_type<typename common_type<_Tp, _Up>::type, V>::type type;
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS common_type<_Tp, void, void>
+struct _LIBCPP_TYPE_VIS_ONLY common_type<_Tp, void, void>
{
public:
typedef _Tp type;
};
template <class _Tp, class _Up>
-struct _LIBCPP_TYPE_VIS common_type<_Tp, _Up, void>
+struct _LIBCPP_TYPE_VIS_ONLY common_type<_Tp, _Up, void>
{
private:
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
@@ -1344,24 +1379,24 @@ public:
template <class ..._Tp> struct common_type;
template <class _Tp>
-struct _LIBCPP_TYPE_VIS common_type<_Tp>
+struct _LIBCPP_TYPE_VIS_ONLY common_type<_Tp>
{
- typedef _Tp type;
+ typedef typename decay<_Tp>::type type;
};
template <class _Tp, class _Up>
-struct _LIBCPP_TYPE_VIS common_type<_Tp, _Up>
+struct _LIBCPP_TYPE_VIS_ONLY common_type<_Tp, _Up>
{
private:
static _Tp&& __t();
static _Up&& __u();
static bool __f();
public:
- typedef typename remove_reference<decltype(__f() ? __t() : __u())>::type type;
+ typedef typename decay<decltype(__f() ? __t() : __u())>::type type;
};
template <class _Tp, class _Up, class ..._Vp>
-struct _LIBCPP_TYPE_VIS common_type<_Tp, _Up, _Vp...>
+struct _LIBCPP_TYPE_VIS_ONLY common_type<_Tp, _Up, _Vp...>
{
typedef typename common_type<typename common_type<_Tp, _Up>::type, _Vp...>::type type;
};
@@ -1374,8 +1409,10 @@ template <class ..._Tp> using common_type_t = typename common_type<_Tp...>::type
// is_assignable
+template<typename, typename _Tp> struct __select_2nd { typedef _Tp type; };
+
template <class _Tp, class _Arg>
-decltype((_VSTD::declval<_Tp>() = _VSTD::declval<_Arg>(), true_type()))
+typename __select_2nd<decltype((_VSTD::declval<_Tp>() = _VSTD::declval<_Arg>())), true_type>::type
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
__is_assignable_test(_Tp&&, _Arg&&);
#else
@@ -1409,13 +1446,13 @@ struct is_assignable
// is_copy_assignable
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_copy_assignable
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_copy_assignable
: public is_assignable<typename add_lvalue_reference<_Tp>::type,
const typename add_lvalue_reference<_Tp>::type> {};
// is_move_assignable
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_move_assignable
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_move_assignable
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
: public is_assignable<typename add_lvalue_reference<_Tp>::type,
const typename add_rvalue_reference<_Tp>::type> {};
@@ -1442,7 +1479,8 @@ __is_destructible_test(_Tp&);
false_type
__is_destructible_test(__any);
-template <class _Tp, bool = is_void<_Tp>::value || is_abstract<_Tp>::value>
+template <class _Tp, bool = is_void<_Tp>::value || is_abstract<_Tp>::value
+ || is_function<_Tp>::value>
struct __destructible_imp
: public common_type
<
@@ -1457,12 +1495,16 @@ template <class _Tp>
struct is_destructible
: public __destructible_imp<_Tp> {};
+template <class _Tp>
+struct is_destructible<_Tp[]>
+ : public false_type {};
+
// move
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
typename remove_reference<_Tp>::type&&
move(_Tp&& __t) _NOEXCEPT
{
@@ -1471,7 +1513,7 @@ move(_Tp&& __t) _NOEXCEPT
}
template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
_Tp&&
forward(typename std::remove_reference<_Tp>::type& __t) _NOEXCEPT
{
@@ -1479,7 +1521,7 @@ forward(typename std::remove_reference<_Tp>::type& __t) _NOEXCEPT
}
template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
_Tp&&
forward(typename std::remove_reference<_Tp>::type&& __t) _NOEXCEPT
{
@@ -1529,29 +1571,6 @@ public:
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-template <class _Tp>
-struct _LIBCPP_TYPE_VIS decay
-{
-private:
- typedef typename remove_reference<_Tp>::type _Up;
-public:
- typedef typename conditional
- <
- is_array<_Up>::value,
- typename remove_extent<_Up>::type*,
- typename conditional
- <
- is_function<_Up>::value,
- typename add_pointer<_Up>::type,
- typename remove_cv<_Up>::type
- >::type
- >::type type;
-};
-
-#if _LIBCPP_STD_VER > 11
-template <class _Tp> using decay_t = typename decay<_Tp>::type;
-#endif
-
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _Tp>
@@ -1913,7 +1932,7 @@ class __result_of<_Fn(_Tp, _A0, _A1, _A2), false, true> // _Fn must be member p
// result_of
template <class _Fn>
-class _LIBCPP_TYPE_VIS result_of<_Fn()>
+class _LIBCPP_TYPE_VIS_ONLY result_of<_Fn()>
: public __result_of<_Fn(),
is_class<typename remove_reference<_Fn>::type>::value ||
is_function<typename remove_reference<_Fn>::type>::value,
@@ -1923,7 +1942,7 @@ class _LIBCPP_TYPE_VIS result_of<_Fn()>
};
template <class _Fn, class _A0>
-class _LIBCPP_TYPE_VIS result_of<_Fn(_A0)>
+class _LIBCPP_TYPE_VIS_ONLY result_of<_Fn(_A0)>
: public __result_of<_Fn(_A0),
is_class<typename remove_reference<_Fn>::type>::value ||
is_function<typename remove_reference<_Fn>::type>::value,
@@ -1933,7 +1952,7 @@ class _LIBCPP_TYPE_VIS result_of<_Fn(_A0)>
};
template <class _Fn, class _A0, class _A1>
-class _LIBCPP_TYPE_VIS result_of<_Fn(_A0, _A1)>
+class _LIBCPP_TYPE_VIS_ONLY result_of<_Fn(_A0, _A1)>
: public __result_of<_Fn(_A0, _A1),
is_class<typename remove_reference<_Fn>::type>::value ||
is_function<typename remove_reference<_Fn>::type>::value,
@@ -1943,7 +1962,7 @@ class _LIBCPP_TYPE_VIS result_of<_Fn(_A0, _A1)>
};
template <class _Fn, class _A0, class _A1, class _A2>
-class _LIBCPP_TYPE_VIS result_of<_Fn(_A0, _A1, _A2)>
+class _LIBCPP_TYPE_VIS_ONLY result_of<_Fn(_A0, _A1, _A2)>
: public __result_of<_Fn(_A0, _A1, _A2),
is_class<typename remove_reference<_Fn>::type>::value ||
is_function<typename remove_reference<_Fn>::type>::value,
@@ -1960,8 +1979,6 @@ class _LIBCPP_TYPE_VIS result_of<_Fn(_A0, _A1, _A2)>
// main is_constructible test
-template<typename, typename T> struct __select_2nd { typedef T type; };
-
template <class _Tp, class ..._Args>
typename __select_2nd<decltype(_VSTD::move(_Tp(_VSTD::declval<_Args>()...))), true_type>::type
__is_constructible_test(_Tp&&, _Args&& ...);
@@ -2048,7 +2065,7 @@ struct __contains_void<_A0, _Args...>
// is_constructible entry point
template <class _Tp, class... _Args>
-struct _LIBCPP_TYPE_VIS is_constructible
+struct _LIBCPP_TYPE_VIS_ONLY is_constructible
: public __is_constructible_void_check<__contains_void<_Tp, _Args...>::value
|| is_abstract<_Tp>::value,
_Tp, _Args...>
@@ -2196,7 +2213,7 @@ struct __nat {};
template <class _Tp, class _A0 = __is_construct::__nat,
class _A1 = __is_construct::__nat>
-struct _LIBCPP_TYPE_VIS is_constructible
+struct _LIBCPP_TYPE_VIS_ONLY is_constructible
: public __is_constructible2_void_check<is_void<_Tp>::value
|| is_abstract<_Tp>::value
|| is_function<_Tp>::value
@@ -2206,7 +2223,7 @@ struct _LIBCPP_TYPE_VIS is_constructible
{};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS is_constructible<_Tp, __is_construct::__nat, __is_construct::__nat>
+struct _LIBCPP_TYPE_VIS_ONLY is_constructible<_Tp, __is_construct::__nat, __is_construct::__nat>
: public __is_constructible0_void_check<is_void<_Tp>::value
|| is_abstract<_Tp>::value
|| is_function<_Tp>::value,
@@ -2214,7 +2231,7 @@ struct _LIBCPP_TYPE_VIS is_constructible<_Tp, __is_construct::__nat, __is_constr
{};
template <class _Tp, class _A0>
-struct _LIBCPP_TYPE_VIS is_constructible<_Tp, _A0, __is_construct::__nat>
+struct _LIBCPP_TYPE_VIS_ONLY is_constructible<_Tp, _A0, __is_construct::__nat>
: public __is_constructible1_void_check<is_void<_Tp>::value
|| is_abstract<_Tp>::value
|| is_function<_Tp>::value
@@ -2262,21 +2279,21 @@ struct __is_constructible2_imp<false, _Ap[], _A0, _A1>
// is_default_constructible
template <class _Tp>
-struct _LIBCPP_TYPE_VIS is_default_constructible
+struct _LIBCPP_TYPE_VIS_ONLY is_default_constructible
: public is_constructible<_Tp>
{};
// is_copy_constructible
template <class _Tp>
-struct _LIBCPP_TYPE_VIS is_copy_constructible
+struct _LIBCPP_TYPE_VIS_ONLY is_copy_constructible
: public is_constructible<_Tp, const typename add_lvalue_reference<_Tp>::type>
{};
// is_move_constructible
template <class _Tp>
-struct _LIBCPP_TYPE_VIS is_move_constructible
+struct _LIBCPP_TYPE_VIS_ONLY is_move_constructible
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
: public is_constructible<_Tp, typename add_rvalue_reference<_Tp>::type>
#else
@@ -2291,7 +2308,7 @@ struct _LIBCPP_TYPE_VIS is_move_constructible
#if __has_feature(is_trivially_constructible)
template <class _Tp, class... _Args>
-struct _LIBCPP_TYPE_VIS is_trivially_constructible
+struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible
: integral_constant<bool, __is_trivially_constructible(_Tp, _Args...)>
{
};
@@ -2299,13 +2316,13 @@ struct _LIBCPP_TYPE_VIS is_trivially_constructible
#else // !__has_feature(is_trivially_constructible)
template <class _Tp, class... _Args>
-struct _LIBCPP_TYPE_VIS is_trivially_constructible
+struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible
: false_type
{
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS is_trivially_constructible<_Tp>
+struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp>
#if __has_feature(has_trivial_constructor) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
: integral_constant<bool, __has_trivial_constructor(_Tp)>
#else
@@ -2316,22 +2333,22 @@ struct _LIBCPP_TYPE_VIS is_trivially_constructible<_Tp>
template <class _Tp>
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-struct _LIBCPP_TYPE_VIS is_trivially_constructible<_Tp, _Tp&&>
+struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp, _Tp&&>
#else
-struct _LIBCPP_TYPE_VIS is_trivially_constructible<_Tp, _Tp>
+struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp, _Tp>
#endif
: integral_constant<bool, is_scalar<_Tp>::value>
{
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS is_trivially_constructible<_Tp, const _Tp&>
+struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp, const _Tp&>
: integral_constant<bool, is_scalar<_Tp>::value>
{
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS is_trivially_constructible<_Tp, _Tp&>
+struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp, _Tp&>
: integral_constant<bool, is_scalar<_Tp>::value>
{
};
@@ -2342,7 +2359,7 @@ struct _LIBCPP_TYPE_VIS is_trivially_constructible<_Tp, _Tp&>
template <class _Tp, class _A0 = __is_construct::__nat,
class _A1 = __is_construct::__nat>
-struct _LIBCPP_TYPE_VIS is_trivially_constructible
+struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible
: false_type
{
};
@@ -2350,28 +2367,28 @@ struct _LIBCPP_TYPE_VIS is_trivially_constructible
#if __has_feature(is_trivially_constructible)
template <class _Tp>
-struct _LIBCPP_TYPE_VIS is_trivially_constructible<_Tp, __is_construct::__nat,
+struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp, __is_construct::__nat,
__is_construct::__nat>
: integral_constant<bool, __is_trivially_constructible(_Tp)>
{
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS is_trivially_constructible<_Tp, _Tp,
+struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp, _Tp,
__is_construct::__nat>
: integral_constant<bool, __is_trivially_constructible(_Tp, _Tp)>
{
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS is_trivially_constructible<_Tp, const _Tp&,
+struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp, const _Tp&,
__is_construct::__nat>
: integral_constant<bool, __is_trivially_constructible(_Tp, const _Tp&)>
{
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS is_trivially_constructible<_Tp, _Tp&,
+struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp, _Tp&,
__is_construct::__nat>
: integral_constant<bool, __is_trivially_constructible(_Tp, _Tp&)>
{
@@ -2380,28 +2397,28 @@ struct _LIBCPP_TYPE_VIS is_trivially_constructible<_Tp, _Tp&,
#else // !__has_feature(is_trivially_constructible)
template <class _Tp>
-struct _LIBCPP_TYPE_VIS is_trivially_constructible<_Tp, __is_construct::__nat,
+struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp, __is_construct::__nat,
__is_construct::__nat>
: integral_constant<bool, is_scalar<_Tp>::value>
{
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS is_trivially_constructible<_Tp, _Tp,
+struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp, _Tp,
__is_construct::__nat>
: integral_constant<bool, is_scalar<_Tp>::value>
{
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS is_trivially_constructible<_Tp, const _Tp&,
+struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp, const _Tp&,
__is_construct::__nat>
: integral_constant<bool, is_scalar<_Tp>::value>
{
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS is_trivially_constructible<_Tp, _Tp&,
+struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp, _Tp&,
__is_construct::__nat>
: integral_constant<bool, is_scalar<_Tp>::value>
{
@@ -2413,19 +2430,19 @@ struct _LIBCPP_TYPE_VIS is_trivially_constructible<_Tp, _Tp&,
// is_trivially_default_constructible
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_trivially_default_constructible
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_trivially_default_constructible
: public is_trivially_constructible<_Tp>
{};
// is_trivially_copy_constructible
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_trivially_copy_constructible
- : public is_trivially_constructible<_Tp, const typename add_lvalue_reference<_Tp>::type>
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_trivially_copy_constructible
+ : public is_trivially_constructible<_Tp, typename add_lvalue_reference<const _Tp>::type>
{};
// is_trivially_move_constructible
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_trivially_move_constructible
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_trivially_move_constructible
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
: public is_trivially_constructible<_Tp, typename add_rvalue_reference<_Tp>::type>
#else
@@ -2473,14 +2490,14 @@ struct is_trivially_assignable<_Tp&, _Tp&&>
// is_trivially_copy_assignable
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_trivially_copy_assignable
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_trivially_copy_assignable
: public is_trivially_assignable<typename add_lvalue_reference<_Tp>::type,
const typename add_lvalue_reference<_Tp>::type>
{};
// is_trivially_move_assignable
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_trivially_move_assignable
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_trivially_move_assignable
: public is_trivially_assignable<typename add_lvalue_reference<_Tp>::type,
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
typename add_rvalue_reference<_Tp>::type>
@@ -2493,7 +2510,7 @@ template <class _Tp> struct _LIBCPP_TYPE_VIS is_trivially_move_assignable
#if __has_feature(has_trivial_destructor) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_trivially_destructible
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_trivially_destructible
: public integral_constant<bool, __has_trivial_destructor(_Tp)> {};
#else // _LIBCPP_HAS_TYPE_TRAITS
@@ -2502,7 +2519,7 @@ template <class _Tp> struct __libcpp_trivial_destructor
: public integral_constant<bool, is_scalar<_Tp>::value ||
is_reference<_Tp>::value> {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_trivially_destructible
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_trivially_destructible
: public __libcpp_trivial_destructor<typename remove_all_extents<_Tp>::type> {};
#endif // _LIBCPP_HAS_TYPE_TRAITS
@@ -2528,13 +2545,13 @@ struct __is_nothrow_constructible<false, _Tp, _Args...>
};
template <class _Tp, class... _Args>
-struct _LIBCPP_TYPE_VIS is_nothrow_constructible
+struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible
: __is_nothrow_constructible<is_constructible<_Tp, _Args...>::value, _Tp, _Args...>
{
};
template <class _Tp, size_t _Ns>
-struct _LIBCPP_TYPE_VIS is_nothrow_constructible<_Tp[_Ns]>
+struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp[_Ns]>
: __is_nothrow_constructible<is_constructible<_Tp>::value, _Tp>
{
};
@@ -2542,13 +2559,13 @@ struct _LIBCPP_TYPE_VIS is_nothrow_constructible<_Tp[_Ns]>
#else // __has_feature(cxx_noexcept)
template <class _Tp, class... _Args>
-struct _LIBCPP_TYPE_VIS is_nothrow_constructible
+struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible
: false_type
{
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS is_nothrow_constructible<_Tp>
+struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp>
#if __has_feature(has_nothrow_constructor) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
: integral_constant<bool, __has_nothrow_constructor(_Tp)>
#else
@@ -2559,9 +2576,9 @@ struct _LIBCPP_TYPE_VIS is_nothrow_constructible<_Tp>
template <class _Tp>
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-struct _LIBCPP_TYPE_VIS is_nothrow_constructible<_Tp, _Tp&&>
+struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, _Tp&&>
#else
-struct _LIBCPP_TYPE_VIS is_nothrow_constructible<_Tp, _Tp>
+struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, _Tp>
#endif
#if __has_feature(has_nothrow_copy) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
: integral_constant<bool, __has_nothrow_copy(_Tp)>
@@ -2572,7 +2589,7 @@ struct _LIBCPP_TYPE_VIS is_nothrow_constructible<_Tp, _Tp>
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS is_nothrow_constructible<_Tp, const _Tp&>
+struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, const _Tp&>
#if __has_feature(has_nothrow_copy) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
: integral_constant<bool, __has_nothrow_copy(_Tp)>
#else
@@ -2582,7 +2599,7 @@ struct _LIBCPP_TYPE_VIS is_nothrow_constructible<_Tp, const _Tp&>
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS is_nothrow_constructible<_Tp, _Tp&>
+struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, _Tp&>
#if __has_feature(has_nothrow_copy) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
: integral_constant<bool, __has_nothrow_copy(_Tp)>
#else
@@ -2597,13 +2614,13 @@ struct _LIBCPP_TYPE_VIS is_nothrow_constructible<_Tp, _Tp&>
template <class _Tp, class _A0 = __is_construct::__nat,
class _A1 = __is_construct::__nat>
-struct _LIBCPP_TYPE_VIS is_nothrow_constructible
+struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible
: false_type
{
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS is_nothrow_constructible<_Tp, __is_construct::__nat,
+struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, __is_construct::__nat,
__is_construct::__nat>
#if __has_feature(has_nothrow_constructor) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
: integral_constant<bool, __has_nothrow_constructor(_Tp)>
@@ -2614,7 +2631,7 @@ struct _LIBCPP_TYPE_VIS is_nothrow_constructible<_Tp, __is_construct::__nat,
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS is_nothrow_constructible<_Tp, _Tp,
+struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, _Tp,
__is_construct::__nat>
#if __has_feature(has_nothrow_copy) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
: integral_constant<bool, __has_nothrow_copy(_Tp)>
@@ -2625,7 +2642,7 @@ struct _LIBCPP_TYPE_VIS is_nothrow_constructible<_Tp, _Tp,
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS is_nothrow_constructible<_Tp, const _Tp&,
+struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, const _Tp&,
__is_construct::__nat>
#if __has_feature(has_nothrow_copy) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
: integral_constant<bool, __has_nothrow_copy(_Tp)>
@@ -2636,7 +2653,7 @@ struct _LIBCPP_TYPE_VIS is_nothrow_constructible<_Tp, const _Tp&,
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS is_nothrow_constructible<_Tp, _Tp&,
+struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, _Tp&,
__is_construct::__nat>
#if __has_feature(has_nothrow_copy) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
: integral_constant<bool, __has_nothrow_copy(_Tp)>
@@ -2650,19 +2667,19 @@ struct _LIBCPP_TYPE_VIS is_nothrow_constructible<_Tp, _Tp&,
// is_nothrow_default_constructible
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_nothrow_default_constructible
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_default_constructible
: public is_nothrow_constructible<_Tp>
{};
// is_nothrow_copy_constructible
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_nothrow_copy_constructible
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_copy_constructible
: public is_nothrow_constructible<_Tp, const typename add_lvalue_reference<_Tp>::type>
{};
// is_nothrow_move_constructible
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_nothrow_move_constructible
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_move_constructible
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
: public is_nothrow_constructible<_Tp, typename add_rvalue_reference<_Tp>::type>
#else
@@ -2689,7 +2706,7 @@ struct __is_nothrow_assignable<true, _Tp, _Arg>
};
template <class _Tp, class _Arg>
-struct _LIBCPP_TYPE_VIS is_nothrow_assignable
+struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_assignable
: public __is_nothrow_assignable<is_assignable<_Tp, _Arg>::value, _Tp, _Arg>
{
};
@@ -2697,11 +2714,11 @@ struct _LIBCPP_TYPE_VIS is_nothrow_assignable
#else // __has_feature(cxx_noexcept)
template <class _Tp, class _Arg>
-struct _LIBCPP_TYPE_VIS is_nothrow_assignable
+struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_assignable
: public false_type {};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS is_nothrow_assignable<_Tp&, _Tp>
+struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_assignable<_Tp&, _Tp>
#if __has_feature(has_nothrow_assign) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
: integral_constant<bool, __has_nothrow_assign(_Tp)> {};
#else
@@ -2709,7 +2726,7 @@ struct _LIBCPP_TYPE_VIS is_nothrow_assignable<_Tp&, _Tp>
#endif
template <class _Tp>
-struct _LIBCPP_TYPE_VIS is_nothrow_assignable<_Tp&, _Tp&>
+struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_assignable<_Tp&, _Tp&>
#if __has_feature(has_nothrow_assign) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
: integral_constant<bool, __has_nothrow_assign(_Tp)> {};
#else
@@ -2717,7 +2734,7 @@ struct _LIBCPP_TYPE_VIS is_nothrow_assignable<_Tp&, _Tp&>
#endif
template <class _Tp>
-struct _LIBCPP_TYPE_VIS is_nothrow_assignable<_Tp&, const _Tp&>
+struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_assignable<_Tp&, const _Tp&>
#if __has_feature(has_nothrow_assign) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
: integral_constant<bool, __has_nothrow_assign(_Tp)> {};
#else
@@ -2740,14 +2757,14 @@ struct is_nothrow_assignable<_Tp&, _Tp&&>
// is_nothrow_copy_assignable
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_nothrow_copy_assignable
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_copy_assignable
: public is_nothrow_assignable<typename add_lvalue_reference<_Tp>::type,
const typename add_lvalue_reference<_Tp>::type>
{};
// is_nothrow_move_assignable
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_nothrow_move_assignable
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_move_assignable
: public is_nothrow_assignable<typename add_lvalue_reference<_Tp>::type,
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
typename add_rvalue_reference<_Tp>::type>
@@ -2775,19 +2792,19 @@ struct __is_nothrow_destructible<true, _Tp>
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS is_nothrow_destructible
+struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_destructible
: public __is_nothrow_destructible<is_destructible<_Tp>::value, _Tp>
{
};
template <class _Tp, size_t _Ns>
-struct _LIBCPP_TYPE_VIS is_nothrow_destructible<_Tp[_Ns]>
+struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_destructible<_Tp[_Ns]>
: public is_nothrow_destructible<_Tp>
{
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS is_nothrow_destructible<_Tp&>
+struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_destructible<_Tp&>
: public true_type
{
};
@@ -2795,7 +2812,7 @@ struct _LIBCPP_TYPE_VIS is_nothrow_destructible<_Tp&>
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _Tp>
-struct _LIBCPP_TYPE_VIS is_nothrow_destructible<_Tp&&>
+struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_destructible<_Tp&&>
: public true_type
{
};
@@ -2808,7 +2825,7 @@ template <class _Tp> struct __libcpp_nothrow_destructor
: public integral_constant<bool, is_scalar<_Tp>::value ||
is_reference<_Tp>::value> {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_nothrow_destructible
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_destructible
: public __libcpp_nothrow_destructor<typename remove_all_extents<_Tp>::type> {};
#endif
@@ -2817,12 +2834,12 @@ template <class _Tp> struct _LIBCPP_TYPE_VIS is_nothrow_destructible
#if __has_feature(is_pod) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_pod
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_pod
: public integral_constant<bool, __is_pod(_Tp)> {};
#else // _LIBCPP_HAS_TYPE_TRAITS
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_pod
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_pod
: public integral_constant<bool, is_trivially_default_constructible<_Tp>::value &&
is_trivially_copy_constructible<_Tp>::value &&
is_trivially_copy_assignable<_Tp>::value &&
@@ -2832,7 +2849,7 @@ template <class _Tp> struct _LIBCPP_TYPE_VIS is_pod
// is_literal_type;
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_literal_type
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_literal_type
#if __has_feature(is_literal)
: public integral_constant<bool, __is_literal(_Tp)>
#else
@@ -2843,7 +2860,7 @@ template <class _Tp> struct _LIBCPP_TYPE_VIS is_literal_type
// is_standard_layout;
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_standard_layout
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_standard_layout
#if __has_feature(is_standard_layout)
: public integral_constant<bool, __is_standard_layout(_Tp)>
#else
@@ -2853,7 +2870,7 @@ template <class _Tp> struct _LIBCPP_TYPE_VIS is_standard_layout
// is_trivially_copyable;
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_trivially_copyable
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_trivially_copyable
#if __has_feature(is_trivially_copyable)
: public integral_constant<bool, __is_trivially_copyable(_Tp)>
#else
@@ -2863,7 +2880,7 @@ template <class _Tp> struct _LIBCPP_TYPE_VIS is_trivially_copyable
// is_trivial;
-template <class _Tp> struct _LIBCPP_TYPE_VIS is_trivial
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_trivial
#if __has_feature(is_trivial)
: public integral_constant<bool, __is_trivial(_Tp)>
#else
@@ -2920,12 +2937,22 @@ struct __check_complete<_Rp (*)(_Param...)>
{
};
+template <class ..._Param>
+struct __check_complete<void (*)(_Param...)>
+{
+};
+
template <class _Rp, class ..._Param>
struct __check_complete<_Rp (_Param...)>
: private __check_complete<_Rp>
{
};
+template <class ..._Param>
+struct __check_complete<void (_Param...)>
+{
+};
+
template <class _Rp, class _Class, class ..._Param>
struct __check_complete<_Rp (_Class::*)(_Param...)>
: private __check_complete<_Class>
@@ -3120,7 +3147,7 @@ struct __invoke_of
};
template <class _Fp, class ..._Args>
-class _LIBCPP_TYPE_VIS result_of<_Fp(_Args...)>
+class _LIBCPP_TYPE_VIS_ONLY result_of<_Fp(_Args...)>
: public __invoke_of<_Fp, _Args...>
{
};
@@ -3239,6 +3266,27 @@ struct underlying_type
#endif // _LIBCXX_UNDERLYING_TYPE
+#ifndef _LIBCPP_HAS_NO_ADVANCED_SFINAE
+
+template <class _Tp>
+struct __has_operator_addressof_imp
+{
+ template <class>
+ static auto __test(__any) -> false_type;
+ template <class _Up>
+ static auto __test(_Up* __u)
+ -> typename __select_2nd<decltype(__u->operator&()), true_type>::type;
+
+ static const bool value = decltype(__test<_Tp>(nullptr))::value;
+};
+
+template <class _Tp>
+struct __has_operator_addressof
+ : public integral_constant<bool, __has_operator_addressof_imp<_Tp>::value>
+{};
+
+#endif // _LIBCPP_HAS_NO_ADVANCED_SFINAE
+
_LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP_TYPE_TRAITS
OpenPOWER on IntegriCloud