File tree 8 files changed +5
-27
lines changed
meta/meta.trans/meta.trans.other
8 files changed +5
-27
lines changed Original file line number Diff line number Diff line change 23
23
24
24
// Ignore warnings about volatile in parameters being deprecated.
25
25
// We know it is, but we still have to test it.
26
- #if defined(__GNUC__) && (__GNUC__ >= 10) && !defined(__clang__ )
26
+ #if defined(TEST_COMPILER_GCC )
27
27
# pragma GCC diagnostic ignored "-Wvolatile"
28
28
#endif
29
29
Original file line number Diff line number Diff line change @@ -39,11 +39,7 @@ void test_const_lvalue_get() {
39
39
{
40
40
using V = std::variant<int , const long >;
41
41
constexpr V v (42 );
42
- #ifdef TEST_WORKAROUND_CONSTEXPR_IMPLIES_NOEXCEPT
43
- ASSERT_NOEXCEPT (std::get<0 >(v));
44
- #else
45
42
ASSERT_NOT_NOEXCEPT (std::get<0 >(v));
46
- #endif
47
43
ASSERT_SAME_TYPE (decltype (std::get<0 >(v)), const int &);
48
44
static_assert (std::get<0 >(v) == 42 , " " );
49
45
}
@@ -57,11 +53,7 @@ void test_const_lvalue_get() {
57
53
{
58
54
using V = std::variant<int , const long >;
59
55
constexpr V v (42l );
60
- #ifdef TEST_WORKAROUND_CONSTEXPR_IMPLIES_NOEXCEPT
61
- ASSERT_NOEXCEPT (std::get<1 >(v));
62
- #else
63
56
ASSERT_NOT_NOEXCEPT (std::get<1 >(v));
64
- #endif
65
57
ASSERT_SAME_TYPE (decltype (std::get<1 >(v)), const long &);
66
58
static_assert (std::get<1 >(v) == 42 , " " );
67
59
}
Original file line number Diff line number Diff line change @@ -33,11 +33,7 @@ void test_const_lvalue_get() {
33
33
{
34
34
using V = std::variant<int , const long >;
35
35
constexpr V v (42 );
36
- #ifdef TEST_WORKAROUND_CONSTEXPR_IMPLIES_NOEXCEPT
37
- ASSERT_NOEXCEPT (std::get<int >(v));
38
- #else
39
36
ASSERT_NOT_NOEXCEPT (std::get<int >(v));
40
- #endif
41
37
ASSERT_SAME_TYPE (decltype (std::get<int >(v)), const int &);
42
38
static_assert (std::get<int >(v) == 42 , " " );
43
39
}
@@ -51,11 +47,7 @@ void test_const_lvalue_get() {
51
47
{
52
48
using V = std::variant<int , const long >;
53
49
constexpr V v (42l );
54
- #ifdef TEST_WORKAROUND_CONSTEXPR_IMPLIES_NOEXCEPT
55
- ASSERT_NOEXCEPT (std::get<const long >(v));
56
- #else
57
50
ASSERT_NOT_NOEXCEPT (std::get<const long >(v));
58
- #endif
59
51
ASSERT_SAME_TYPE (decltype (std::get<const long >(v)), const long &);
60
52
static_assert (std::get<const long >(v) == 42 , " " );
61
53
}
Original file line number Diff line number Diff line change 25
25
# endif
26
26
#endif
27
27
28
- #if defined(TEST_COMPILER_GCC)
29
- # if __GNUC__ < 9
30
- # define TEST_WORKAROUND_CONSTEXPR_IMPLIES_NOEXCEPT // GCC-87603
31
- # endif
32
- #endif
33
-
34
28
#endif // SUPPORT_TEST_WORKAROUNDS_H
Original file line number Diff line number Diff line change 18
18
// bases.
19
19
#if defined(__clang__)
20
20
# pragma clang diagnostic ignored "-Winaccessible-base"
21
- #elif defined(__GNUC__) && (__GNUC__ >= 10)
21
+ #elif defined(__GNUC__)
22
22
# pragma GCC diagnostic ignored "-Winaccessible-base"
23
23
#endif
24
24
Original file line number Diff line number Diff line change 13
13
// bases.
14
14
#if defined(__clang__)
15
15
# pragma clang diagnostic ignored "-Winaccessible-base"
16
- #elif defined(__GNUC__) && (__GNUC__ >= 10)
16
+ #elif defined(__GNUC__)
17
17
# pragma GCC diagnostic ignored "-Winaccessible-base"
18
18
#endif
19
19
Original file line number Diff line number Diff line change 13
13
// bases.
14
14
#if defined(__clang__)
15
15
# pragma clang diagnostic ignored "-Winaccessible-base"
16
- #elif defined(__GNUC__) && (__GNUC__ >= 10)
16
+ #elif defined(__GNUC__)
17
17
# pragma GCC diagnostic ignored "-Winaccessible-base"
18
18
#endif
19
19
Original file line number Diff line number Diff line change 14
14
#include < stdio.h>
15
15
16
16
// Suppress diagnostics about deprecated volatile operations
17
- #if defined(__GNUC__) && (__GNUC__ >= 10) && !defined(__clang__)
17
+ #if defined(__GNUC__) && !defined(__clang__)
18
18
# pragma GCC diagnostic ignored "-Wvolatile"
19
19
#endif
20
20
You can’t perform that action at this time.
0 commit comments