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

Howard Hinnant hhinnant at apple.com
Wed Feb 15 07:08:30 PST 2012


Author: hhinnant
Date: Wed Feb 15 09:08:30 2012
New Revision: 150581

URL: http://llvm.org/viewvc/llvm-project?rev=150581&view=rev
Log:
Remove reference from common_type definition.  It looks like a recent clang decltype implementation got fixed/improved and exposed this.  Fixes http://llvm.org/bugs/show_bug.cgi?id=12007.

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=150581&r1=150580&r2=150581&view=diff
==============================================================================
--- libcxx/trunk/include/type_traits (original)
+++ libcxx/trunk/include/type_traits Wed Feb 15 09:08:30 2012
@@ -1144,7 +1144,7 @@
     static _Up __u();
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
 public:
-    typedef decltype(true ? __t() : __u()) type;
+    typedef typename remove_reference<decltype(true ? __t() : __u())>::type type;
 };
 
 #else  // _LIBCPP_HAS_NO_VARIADICS





More information about the cfe-commits mailing list