Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Jan 2014 17:22:54 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r260263 - in stable: 10/contrib/libc++/include 9/contrib/libc++/include
Message-ID:  <201401041722.s04HMsDc014943@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Sat Jan  4 17:22:53 2014
New Revision: 260263
URL: http://svnweb.freebsd.org/changeset/base/260263

Log:
  MFC r260015:
  
  In libc++'s type_traits header, avoid warnings (activated by our use of
  -Wsystem-headers) about potential keyword compatibility problems, by
  adding a __libcpp prefix to the applicable identifiers.
  
  Upstream is still debating about this, but we need it now, to be able to
  import clang 3.4.

Modified:
  stable/10/contrib/libc++/include/type_traits
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/9/contrib/libc++/include/type_traits
Directory Properties:
  stable/9/contrib/libc++/   (props changed)

Modified: stable/10/contrib/libc++/include/type_traits
==============================================================================
--- stable/10/contrib/libc++/include/type_traits	Sat Jan  4 17:09:41 2014	(r260262)
+++ stable/10/contrib/libc++/include/type_traits	Sat Jan  4 17:22:53 2014	(r260263)
@@ -280,53 +280,53 @@ template <class _Tp> using remove_cv_t =
 
 // 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 is_void
-    : public __is_void<typename remove_cv<_Tp>::type> {};
+    : public __libcpp_is_void<typename remove_cv<_Tp>::type> {};
 
 // __is_nullptr_t
 
-template <class _Tp> struct ____is_nullptr_t       : public false_type {};
-template <>          struct ____is_nullptr_t<nullptr_t> : public true_type {};
+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
-    : public ____is_nullptr_t<typename remove_cv<_Tp>::type> {};
+    : public __libcpp___is_nullptr<typename remove_cv<_Tp>::type> {};
 
 // 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 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 is_floating_point
-    : public __is_floating_point<typename remove_cv<_Tp>::type> {};
+    : public __libcpp_is_floating_point<typename remove_cv<_Tp>::type> {};
 
 // is_array
 
@@ -339,11 +339,11 @@ template <class _Tp, size_t _Np> struct 
 
 // 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 is_pointer
-    : public __is_pointer<typename remove_cv<_Tp>::type> {};
+    : public __libcpp_is_pointer<typename remove_cv<_Tp>::type> {};
 
 // is_reference
 
@@ -419,29 +419,29 @@ template <class _Tp, bool = is_class<_Tp
                             is_void<_Tp>::value  ||
                             is_reference<_Tp>::value ||
                             is_same<_Tp, nullptr_t>::value >
-struct __is_function
+struct __libcpp_is_function
     : public integral_constant<bool, sizeof(__is_function_imp::__test<_Tp>(__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 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 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 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
 
@@ -640,11 +640,11 @@ template <class _Tp>
 struct ___is_signed<_Tp, false> : public true_type {};  // floating point
 
 template <class _Tp, bool = is_arithmetic<_Tp>::value>
-struct __is_signed : public ___is_signed<_Tp> {};
+struct __libcpp_is_signed : public ___is_signed<_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 is_signed : public __is_signed<_Tp> {};
+template <class _Tp> struct _LIBCPP_TYPE_VIS is_signed : public __libcpp_is_signed<_Tp> {};
 
 // is_unsigned
 
@@ -655,11 +655,11 @@ template <class _Tp>
 struct ___is_unsigned<_Tp, false> : public false_type {};  // floating point
 
 template <class _Tp, bool = is_arithmetic<_Tp>::value>
-struct __is_unsigned : public ___is_unsigned<_Tp> {};
+struct __libcpp_is_unsigned : public ___is_unsigned<_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 is_unsigned : public __is_unsigned<_Tp> {};
+template <class _Tp> struct _LIBCPP_TYPE_VIS is_unsigned : public __libcpp_is_unsigned<_Tp> {};
 
 // rank
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401041722.s04HMsDc014943>