mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-22 07:51:39 +08:00
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
This commit is contained in:
@@ -17,7 +17,7 @@ template <class EnumType, EnumType Val1, EnumType Val2,
|
||||
struct check_bitmask_type {
|
||||
|
||||
static constexpr UT dcast(EnumType e) { return static_cast<UT>(e); }
|
||||
static constexpr UT unpromote(decltype(~UZero) promoted) { return static_cast<UT>(promoted); }
|
||||
static constexpr UT unpromote(decltype((~UZero)) promoted) { return static_cast<UT>(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));
|
||||
|
Reference in New Issue
Block a user