[cfe-commits] [libcxx] r125290 - /libcxx/trunk/include/type_traits

Howard Hinnant hhinnant at apple.com
Thu Feb 10 09:46:04 PST 2011


Author: hhinnant
Date: Thu Feb 10 11:46:03 2011
New Revision: 125290

URL: http://llvm.org/viewvc/llvm-project?rev=125290&view=rev
Log:
Installed __has_feature(is_convertible_to) and __has_feature(is_base_of)

Modified:
    libcxx/trunk/include/type_traits

Modified: libcxx/trunk/include/type_traits
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/type_traits?rev=125290&r1=125289&r2=125290&view=diff
==============================================================================
--- libcxx/trunk/include/type_traits (original)
+++ libcxx/trunk/include/type_traits Thu Feb 10 11:46:03 2011
@@ -598,12 +598,12 @@
 
 // is_convertible
 
-#ifdef __clang__
+#if __has_feature(is_convertible_to)
 
 template <class _T1, class _T2> struct _LIBCPP_VISIBLE is_convertible
     : public integral_constant<bool, __is_convertible_to(_T1, _T2)> {};
 
-#else  // __clang__
+#else  // __has_feature(is_convertible_to)
 
 namespace __is_convertible_imp
 {
@@ -705,17 +705,17 @@
     static const size_t __complete_check2 = __is_convertible_check<_T2>::__v;
 };
 
-#endif  // __clang__
+#endif  // __has_feature(is_convertible_to)
 
 // is_base_of
 
-#ifdef __clang__
+#ifdef __has_feature(is_base_of)
 
 template <class _Bp, class _Dp>
 struct _LIBCPP_VISIBLE is_base_of
     : public integral_constant<bool, __is_base_of(_Bp, _Dp)> {};
 
-#else  // __clang__
+#else  // __has_feature(is_base_of)
 
 //  (C) Copyright Rani Sharoni 2003.
 //  Use, modification and distribution are subject to the Boost Software License,
@@ -763,7 +763,7 @@
 {
 };
 
-#endif  // __clang__
+#endif  // __has_feature(is_base_of)
 
 // is_empty
 





More information about the cfe-commits mailing list