From e5285fd6b6379598c8e7b4ce8c0a315ddef225ca Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Wed, 15 Feb 2012 15:08:30 +0000 Subject: [PATCH] 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. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@150581 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/type_traits | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/type_traits b/include/type_traits index 5911c039..2bf520a3 100644 --- a/include/type_traits +++ b/include/type_traits @@ -1144,7 +1144,7 @@ private: static _Up __u(); #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES public: - typedef decltype(true ? __t() : __u()) type; + typedef typename remove_reference::type type; }; #else // _LIBCPP_HAS_NO_VARIADICS