Rename libc++ internal templates __is_void, __is_integral, __is_floating_point, __is_pointer, __is_function_imp, __is_function, __is_member_function_pointer, __is_member_pointer, __is_signed_impl, __is_signed, __is_unsigned_impl, __is_unsigned to __libcpp_is_XXX, because some compilers have decided that __is_XXX are keywords. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@199184 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
72fe0ae7cf
commit
8896ac3cdd
@ -285,11 +285,11 @@ template <class _Tp> using remove_cv_t = typename remove_cv<_Tp>::type;
|
||||
|
||||
// is_void
|
||||
|
||||
template <class _Tp> struct __is_void : public false_type {};
|
||||
template <> struct __is_void<void> : public true_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_ONLY is_void
|
||||
: public __is_void<typename remove_cv<_Tp>::type> {};
|
||||
: public __libcpp_is_void<typename remove_cv<_Tp>::type> {};
|
||||
|
||||
// __is_nullptr_t
|
||||
|
||||
@ -306,37 +306,37 @@ template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_null_pointer
|
||||
|
||||
// is_integral
|
||||
|
||||
template <class _Tp> struct __is_integral : public false_type {};
|
||||
template <> struct __is_integral<bool> : public true_type {};
|
||||
template <> struct __is_integral<char> : public true_type {};
|
||||
template <> struct __is_integral<signed char> : public true_type {};
|
||||
template <> struct __is_integral<unsigned char> : public true_type {};
|
||||
template <> struct __is_integral<wchar_t> : public true_type {};
|
||||
template <class _Tp> struct __libcpp_is_integral : public false_type {};
|
||||
template <> struct __libcpp_is_integral<bool> : public true_type {};
|
||||
template <> struct __libcpp_is_integral<char> : public true_type {};
|
||||
template <> struct __libcpp_is_integral<signed char> : public true_type {};
|
||||
template <> struct __libcpp_is_integral<unsigned char> : public true_type {};
|
||||
template <> struct __libcpp_is_integral<wchar_t> : public true_type {};
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
template <> struct __is_integral<char16_t> : public true_type {};
|
||||
template <> struct __is_integral<char32_t> : public true_type {};
|
||||
template <> struct __libcpp_is_integral<char16_t> : public true_type {};
|
||||
template <> struct __libcpp_is_integral<char32_t> : public true_type {};
|
||||
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
template <> struct __is_integral<short> : public true_type {};
|
||||
template <> struct __is_integral<unsigned short> : public true_type {};
|
||||
template <> struct __is_integral<int> : public true_type {};
|
||||
template <> struct __is_integral<unsigned int> : public true_type {};
|
||||
template <> struct __is_integral<long> : public true_type {};
|
||||
template <> struct __is_integral<unsigned long> : public true_type {};
|
||||
template <> struct __is_integral<long long> : public true_type {};
|
||||
template <> struct __is_integral<unsigned long long> : public true_type {};
|
||||
template <> struct __libcpp_is_integral<short> : public true_type {};
|
||||
template <> struct __libcpp_is_integral<unsigned short> : public true_type {};
|
||||
template <> struct __libcpp_is_integral<int> : public true_type {};
|
||||
template <> struct __libcpp_is_integral<unsigned int> : public true_type {};
|
||||
template <> struct __libcpp_is_integral<long> : public true_type {};
|
||||
template <> struct __libcpp_is_integral<unsigned long> : public true_type {};
|
||||
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_ONLY is_integral
|
||||
: public __is_integral<typename remove_cv<_Tp>::type> {};
|
||||
: public __libcpp_is_integral<typename remove_cv<_Tp>::type> {};
|
||||
|
||||
// is_floating_point
|
||||
|
||||
template <class _Tp> struct __is_floating_point : public false_type {};
|
||||
template <> struct __is_floating_point<float> : public true_type {};
|
||||
template <> struct __is_floating_point<double> : public true_type {};
|
||||
template <> struct __is_floating_point<long double> : public true_type {};
|
||||
template <class _Tp> struct __libcpp_is_floating_point : public false_type {};
|
||||
template <> struct __libcpp_is_floating_point<float> : public true_type {};
|
||||
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_ONLY is_floating_point
|
||||
: public __is_floating_point<typename remove_cv<_Tp>::type> {};
|
||||
: public __libcpp_is_floating_point<typename remove_cv<_Tp>::type> {};
|
||||
|
||||
// is_array
|
||||
|
||||
@ -349,11 +349,11 @@ template <class _Tp, size_t _Np> struct _LIBCPP_TYPE_VIS_ONLY is_array<_Tp[_Np]>
|
||||
|
||||
// is_pointer
|
||||
|
||||
template <class _Tp> struct __is_pointer : public false_type {};
|
||||
template <class _Tp> struct __is_pointer<_Tp*> : public true_type {};
|
||||
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_ONLY is_pointer
|
||||
: public __is_pointer<typename remove_cv<_Tp>::type> {};
|
||||
: public __libcpp_is_pointer<typename remove_cv<_Tp>::type> {};
|
||||
|
||||
// is_reference
|
||||
|
||||
@ -417,7 +417,7 @@ template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_same<_Tp, _Tp> :
|
||||
|
||||
// is_function
|
||||
|
||||
namespace __is_function_imp
|
||||
namespace __libcpp_is_function_imp
|
||||
{
|
||||
template <class _Tp> char __test(_Tp*);
|
||||
template <class _Tp> __two __test(...);
|
||||
@ -429,29 +429,29 @@ template <class _Tp, bool = is_class<_Tp>::value ||
|
||||
is_void<_Tp>::value ||
|
||||
is_reference<_Tp>::value ||
|
||||
__is_nullptr_t<_Tp>::value >
|
||||
struct __is_function
|
||||
: public integral_constant<bool, sizeof(__is_function_imp::__test<_Tp>(__is_function_imp::__source<_Tp>())) == 1>
|
||||
struct __libcpp_is_function
|
||||
: public integral_constant<bool, sizeof(__libcpp_is_function_imp::__test<_Tp>(__libcpp_is_function_imp::__source<_Tp>())) == 1>
|
||||
{};
|
||||
template <class _Tp> struct __is_function<_Tp, true> : public false_type {};
|
||||
template <class _Tp> struct __libcpp_is_function<_Tp, true> : public false_type {};
|
||||
|
||||
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_function
|
||||
: public __is_function<_Tp> {};
|
||||
: public __libcpp_is_function<_Tp> {};
|
||||
|
||||
// is_member_function_pointer
|
||||
|
||||
template <class _Tp> struct __is_member_function_pointer : public false_type {};
|
||||
template <class _Tp, class _Up> struct __is_member_function_pointer<_Tp _Up::*> : public is_function<_Tp> {};
|
||||
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_ONLY is_member_function_pointer
|
||||
: public __is_member_function_pointer<typename remove_cv<_Tp>::type> {};
|
||||
: public __libcpp_is_member_function_pointer<typename remove_cv<_Tp>::type> {};
|
||||
|
||||
// is_member_pointer
|
||||
|
||||
template <class _Tp> struct __is_member_pointer : public false_type {};
|
||||
template <class _Tp, class _Up> struct __is_member_pointer<_Tp _Up::*> : public true_type {};
|
||||
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_ONLY is_member_pointer
|
||||
: public __is_member_pointer<typename remove_cv<_Tp>::type> {};
|
||||
: public __libcpp_is_member_pointer<typename remove_cv<_Tp>::type> {};
|
||||
|
||||
// is_member_object_pointer
|
||||
|
||||
@ -644,32 +644,32 @@ template <class _Tp> using add_pointer_t = typename add_pointer<_Tp>::type;
|
||||
// is_signed
|
||||
|
||||
template <class _Tp, bool = is_integral<_Tp>::value>
|
||||
struct __is_signed_impl : public integral_constant<bool, _Tp(-1) < _Tp(0)> {};
|
||||
struct __libcpp_is_signed_impl : public integral_constant<bool, _Tp(-1) < _Tp(0)> {};
|
||||
|
||||
template <class _Tp>
|
||||
struct __is_signed_impl<_Tp, false> : public true_type {}; // floating point
|
||||
struct __libcpp_is_signed_impl<_Tp, false> : public true_type {}; // floating point
|
||||
|
||||
template <class _Tp, bool = is_arithmetic<_Tp>::value>
|
||||
struct __is_signed : public __is_signed_impl<_Tp> {};
|
||||
struct __libcpp_is_signed : public __libcpp_is_signed_impl<_Tp> {};
|
||||
|
||||
template <class _Tp> struct __is_signed<_Tp, false> : public false_type {};
|
||||
template <class _Tp> struct __libcpp_is_signed<_Tp, false> : public false_type {};
|
||||
|
||||
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_signed : public __is_signed<_Tp> {};
|
||||
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_signed : public __libcpp_is_signed<_Tp> {};
|
||||
|
||||
// is_unsigned
|
||||
|
||||
template <class _Tp, bool = is_integral<_Tp>::value>
|
||||
struct __is_unsigned_impl : public integral_constant<bool, _Tp(0) < _Tp(-1)> {};
|
||||
struct __libcpp_is_unsigned_impl : public integral_constant<bool, _Tp(0) < _Tp(-1)> {};
|
||||
|
||||
template <class _Tp>
|
||||
struct __is_unsigned_impl<_Tp, false> : public false_type {}; // floating point
|
||||
struct __libcpp_is_unsigned_impl<_Tp, false> : public false_type {}; // floating point
|
||||
|
||||
template <class _Tp, bool = is_arithmetic<_Tp>::value>
|
||||
struct __is_unsigned : public __is_unsigned_impl<_Tp> {};
|
||||
struct __libcpp_is_unsigned : public __libcpp_is_unsigned_impl<_Tp> {};
|
||||
|
||||
template <class _Tp> struct __is_unsigned<_Tp, false> : public false_type {};
|
||||
template <class _Tp> struct __libcpp_is_unsigned<_Tp, false> : public false_type {};
|
||||
|
||||
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_unsigned : public __is_unsigned<_Tp> {};
|
||||
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_unsigned : public __libcpp_is_unsigned<_Tp> {};
|
||||
|
||||
// rank
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user