diff --git a/tests/std/tests/P0088R3_variant/test.cpp b/tests/std/tests/P0088R3_variant/test.cpp index 2857e561b3a..7a66a9f06e0 100644 --- a/tests/std/tests/P0088R3_variant/test.cpp +++ b/tests/std/tests/P0088R3_variant/test.cpp @@ -6617,10 +6617,10 @@ namespace msvc { // //===----------------------------------------------------------------------===// - enum CallType : unsigned { CT_None, CT_NonConst = 1, CT_Const = 2, CT_LValue = 4, CT_RValue = 8 }; + enum CallType : unsigned int { CT_None, CT_NonConst = 1, CT_Const = 2, CT_LValue = 4, CT_RValue = 8 }; constexpr CallType operator|(CallType LHS, CallType RHS) { - return static_cast(static_cast(LHS) | static_cast(RHS)); + return static_cast(static_cast(LHS) | static_cast(RHS)); } struct ForwardingCallObject { diff --git a/tests/std/tests/P0898R3_concepts/test.cpp b/tests/std/tests/P0898R3_concepts/test.cpp index 80c224e7df3..6a3ece735e0 100644 --- a/tests/std/tests/P0898R3_concepts/test.cpp +++ b/tests/std/tests/P0898R3_concepts/test.cpp @@ -876,7 +876,7 @@ namespace test_integral_concepts { STATIC_ASSERT(test_integral()); STATIC_ASSERT(test_integral()); - STATIC_ASSERT(test_integral()); + STATIC_ASSERT(test_integral()); STATIC_ASSERT(test_integral()); STATIC_ASSERT(test_integral()); @@ -934,7 +934,7 @@ namespace test_floating_point { STATIC_ASSERT(!test_floating_point()); STATIC_ASSERT(!test_floating_point()); - STATIC_ASSERT(!test_floating_point()); + STATIC_ASSERT(!test_floating_point()); STATIC_ASSERT(!test_floating_point()); STATIC_ASSERT(!test_floating_point()); @@ -2403,7 +2403,7 @@ namespace test_boolean_testable { }; STATIC_ASSERT(_Boolean_testable); - template // values in [0, Archetype_max) select a requirement to violate + template // values in [0, Archetype_max) select a requirement to violate struct Archetype { // clang-format off operator bool() const requires (Select != 0); // Archetype<0> is not implicitly convertible to bool @@ -2448,14 +2448,14 @@ namespace test_equality_comparable { STATIC_ASSERT(!test()); - template // selects one requirement to violate + template // selects one requirement to violate struct Archetype {}; - template + template bool operator==(Archetype const&); void operator==(Archetype<0> const&, Archetype<0> const&); // Archetype<0> == Archetype<0> is not _Boolean_testable - template + template bool operator!=(Archetype const&); void operator!=(Archetype<1> const&, Archetype<1> const&); // Archetype<1> != Archetype<1> is not _Boolean_testable @@ -2605,31 +2605,31 @@ namespace test_totally_ordered { STATIC_ASSERT(!test()); STATIC_ASSERT(!test()); - constexpr unsigned Archetype_max = 6; - template // values in [0, Archetype_max) select a requirement to violate + constexpr unsigned int Archetype_max = 6; + template // values in [0, Archetype_max) select a requirement to violate struct Archetype {}; - template + template bool operator==(Archetype const&); void operator==(Archetype<0> const&, Archetype<0> const&); - template + template bool operator!=(Archetype const&); void operator!=(Archetype<1> const&, Archetype<1> const&); - template + template bool operator<(Archetype const&); void operator<(Archetype<2> const&, Archetype<2> const&); - template + template bool operator>(Archetype const&); void operator>(Archetype<3> const&, Archetype<3> const&); - template + template bool operator<=(Archetype const&); void operator<=(Archetype<4> const&, Archetype<4> const&); - template + template bool operator>=(Archetype const&); void operator>=(Archetype<5> const&, Archetype<5> const&); @@ -3334,29 +3334,29 @@ namespace test_relation { operator bool() const; }; - template + template struct A {}; // clang-format off - template + template requires (0 < U) Bool operator==(A, A); // A<0> == A<0> is invalid // clang-format on STATIC_ASSERT(!test>()); STATIC_ASSERT(test>()); - template + template struct B {}; void operator==(B<1>, B<1>); // B<1> == B<1> does not model _Boolean_testable - template + template bool operator==(B, B); STATIC_ASSERT(test>()); STATIC_ASSERT(!test>()); // clang-format off - template + template requires (2 != I) bool operator==(A, B); // A<2> == B<2> rewrites to B<2> == A<2> - template + template requires (3 != I) bool operator==(B, A); // B<3> == A<3> rewrites to A<3> == B<3> // clang-format on @@ -3367,12 +3367,12 @@ namespace test_relation { STATIC_ASSERT(test, B<3>>()); STATIC_ASSERT(test, B<4>>()); - template + template struct C {}; enum E : bool { No, Yes }; E operator==(C<0>&, C<0>&); // const C<0> == const C<0> is invalid // clang-format off - template + template requires (0 != I) E operator==(C, C); // clang-format on @@ -3397,23 +3397,23 @@ namespace test_uniform_random_bit_generator { STATIC_ASSERT(uniform_random_bit_generator); struct NoCall { - static constexpr unsigned min() { + static constexpr unsigned int min() { return 0; } - static constexpr unsigned max() { + static constexpr unsigned int max() { return 42; } }; STATIC_ASSERT(!uniform_random_bit_generator); struct NoLvalueCall { - static constexpr unsigned min() { + static constexpr unsigned int min() { return 0; } - static constexpr unsigned max() { + static constexpr unsigned int max() { return 42; } - unsigned operator()() &&; + unsigned int operator()() &&; }; STATIC_ASSERT(!uniform_random_bit_generator); @@ -3429,21 +3429,21 @@ namespace test_uniform_random_bit_generator { STATIC_ASSERT(!uniform_random_bit_generator); struct NoMin { - static constexpr unsigned max() { + static constexpr unsigned int max() { return 42; } - unsigned operator()(); + unsigned int operator()(); }; STATIC_ASSERT(!uniform_random_bit_generator); struct NonConstexprMin { - static unsigned min() { + static unsigned int min() { return 0; } - static constexpr unsigned max() { + static constexpr unsigned int max() { return 42; } - unsigned operator()(); + unsigned int operator()(); }; STATIC_ASSERT(!uniform_random_bit_generator); @@ -3451,85 +3451,85 @@ namespace test_uniform_random_bit_generator { static constexpr int min() { return 0; } - static constexpr unsigned max() { + static constexpr unsigned int max() { return 42; } - unsigned operator()(); + unsigned int operator()(); }; STATIC_ASSERT(!uniform_random_bit_generator); struct NoMax { - static constexpr unsigned min() { + static constexpr unsigned int min() { return 0; } - unsigned operator()(); + unsigned int operator()(); }; STATIC_ASSERT(!uniform_random_bit_generator); struct NonConstexprMax { - static constexpr unsigned min() { + static constexpr unsigned int min() { return 0; } - static unsigned max() { + static unsigned int max() { return 42; } - unsigned operator()(); + unsigned int operator()(); }; STATIC_ASSERT(!uniform_random_bit_generator); struct BadMax { - static constexpr unsigned min() { + static constexpr unsigned int min() { return 0; } static constexpr int max() { return 42; } - unsigned operator()(); + unsigned int operator()(); }; STATIC_ASSERT(!uniform_random_bit_generator); struct EmptyRange { - static constexpr unsigned min() { + static constexpr unsigned int min() { return 0; } - static constexpr unsigned max() { + static constexpr unsigned int max() { return 0; } - unsigned operator()(); + unsigned int operator()(); }; STATIC_ASSERT(!uniform_random_bit_generator); struct ReversedRange { - static constexpr unsigned min() { + static constexpr unsigned int min() { return 42; } - static constexpr unsigned max() { + static constexpr unsigned int max() { return 0; } - unsigned operator()(); + unsigned int operator()(); }; STATIC_ASSERT(!uniform_random_bit_generator); struct URBG { - static constexpr unsigned min() { + static constexpr unsigned int min() { return 0; } - static constexpr unsigned max() { + static constexpr unsigned int max() { return 42; } - unsigned operator()(); + unsigned int operator()(); }; STATIC_ASSERT(uniform_random_bit_generator); STATIC_ASSERT(!uniform_random_bit_generator); struct ConstURBG { - static constexpr unsigned min() { + static constexpr unsigned int min() { return 0; } - static constexpr unsigned max() { + static constexpr unsigned int max() { return 42; } - unsigned operator()() const; + unsigned int operator()() const; }; STATIC_ASSERT(uniform_random_bit_generator); STATIC_ASSERT(uniform_random_bit_generator);