From a730ec37a99cc59afd3f981bc1d1ef68d0eda12c Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Fri, 17 Jun 2016 23:30:40 +0000 Subject: [PATCH] Work around GCC bug in tests. The bug has been fixed in GCC 6.0 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273068 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../experimental/filesystem/fs.enum/check_bitmask_types.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/std/experimental/filesystem/fs.enum/check_bitmask_types.hpp b/test/std/experimental/filesystem/fs.enum/check_bitmask_types.hpp index 0ad882f24..77b136f3f 100644 --- a/test/std/experimental/filesystem/fs.enum/check_bitmask_types.hpp +++ b/test/std/experimental/filesystem/fs.enum/check_bitmask_types.hpp @@ -17,7 +17,7 @@ template (e); } - static constexpr UT unpromote(decltype(~UZero) promoted) { return static_cast(promoted); } + static constexpr UT unpromote(decltype((~UZero)) promoted) { return static_cast(promoted); } // We need two values that are non-zero and share at least one bit. static_assert(Val1 != Zero && Val2 != Zero, ""); static_assert(Val1 != Val2, ""); @@ -31,7 +31,7 @@ struct check_bitmask_type { ASSERT_SAME_TYPE(EnumType, decltype(Val1 & Val2)); ASSERT_SAME_TYPE(EnumType, decltype(Val1 | Val2)); ASSERT_SAME_TYPE(EnumType, decltype(Val1 ^ Val2)); - ASSERT_SAME_TYPE(EnumType, decltype(~Val1)); + ASSERT_SAME_TYPE(EnumType, decltype((~Val1))); ASSERT_SAME_TYPE(EnumType&, decltype(ValRef &= Val2)); ASSERT_SAME_TYPE(EnumType&, decltype(ValRef |= Val2)); ASSERT_SAME_TYPE(EnumType&, decltype(ValRef ^= Val2));