OSDN Git Service

Fix bit_cast __is_trivially_copyable
authorJF Bastien <jfbastien@apple.com>
Mon, 10 Sep 2018 21:41:14 +0000 (21:41 +0000)
committerJF Bastien <jfbastien@apple.com>
Mon, 10 Sep 2018 21:41:14 +0000 (21:41 +0000)
It's a function-like builtin, not a template.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341866 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/bit.h

index 7d13802..0d772ac 100644 (file)
@@ -27,8 +27,8 @@ template <typename To, typename From
           , typename = typename std::enable_if<std::is_trivially_copyable<To>::value>::type
           , typename = typename std::enable_if<std::is_trivially_copyable<From>::value>::type
 #elif __has_feature(is_trivially_copyable)
-          , typename = typename std::enable_if<__is_trivially_copyable<To>::value>::type
-          , typename = typename std::enable_if<__is_trivially_copyable<From>::value>::type
+          , typename = typename std::enable_if<__is_trivially_copyable(To>>::type
+          , typename = typename std::enable_if<__is_trivially_copyable(From)>::type
 #else
   // This case is GCC 4.x. clang with libc++ or libstdc++ never get here. Unlike
   // llvm/Support/type_traits.h's isPodLike we don't want to provide a