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

Howard Hinnant hhinnant at apple.com
Fri Dec 2 12:41:47 PST 2011


Author: hhinnant
Date: Fri Dec  2 14:41:47 2011
New Revision: 145703

URL: http://llvm.org/viewvc/llvm-project?rev=145703&view=rev
Log:
Fix http://llvm.org/bugs/show_bug.cgi?id=11459.  Patch supplied by Alberto Ganesh Barbati.

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=145703&r1=145702&r2=145703&view=diff
==============================================================================
--- libcxx/trunk/include/type_traits (original)
+++ libcxx/trunk/include/type_traits Fri Dec  2 14:41:47 2011
@@ -741,6 +741,14 @@
 
 // is_empty
 
+#if __has_feature(is_empty)
+
+template <class _Tp>
+struct _LIBCPP_VISIBLE is_empty
+    : public integral_constant<bool, __is_empty(_Tp)> {};
+
+#else  // __has_feature(is_empty)
+
 template <class _Tp>
 struct __is_empty1
     : public _Tp
@@ -760,6 +768,8 @@
 
 template <class _Tp> struct _LIBCPP_VISIBLE is_empty : public __libcpp_empty<_Tp> {};
 
+#endif  // __has_feature(is_empty)
+
 // is_polymorphic
 
 template <class _Tp> struct __is_polymorphic1 : public _Tp {};





More information about the cfe-commits mailing list