diff options
| author | Martin Hořeňovský | 2022-11-22 15:23:03 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2022-11-22 15:23:03 +0100 |
| commit | a20200be7e29e4be4929167b3bc56bb03d30ca4a (patch) | |
| tree | f662070ac56334a3d4206ca772d93a17674231aa /tests/SelfTest/UsageTests | |
| parent | 291c502f6676b8d304b608f936ec26e3b347054a (diff) | |
| download | catch3-a20200be7e29e4be4929167b3bc56bb03d30ca4a.tar.gz | |
Revert "Fix old GCC + types with ambiguous constructor from 0"
This reverts commit 291c502f6676b8d304b608f936ec26e3b347054a.
The issue is that it breaks under C++20 for some reason.
Diffstat (limited to 'tests/SelfTest/UsageTests')
| -rw-r--r-- | tests/SelfTest/UsageTests/Compilation.tests.cpp | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/tests/SelfTest/UsageTests/Compilation.tests.cpp b/tests/SelfTest/UsageTests/Compilation.tests.cpp index a7b32df9..a61a9674 100644 --- a/tests/SelfTest/UsageTests/Compilation.tests.cpp +++ b/tests/SelfTest/UsageTests/Compilation.tests.cpp @@ -329,29 +329,3 @@ TEST_CASE( "#2555 - types that can only be compared with 0 literal (not int/long REQUIRE( TypeWithLit0Comparisons{} != 0 ); REQUIRE_FALSE( 0 != TypeWithLit0Comparisons{} ); } - -namespace { - struct MultipleImplicitConstructors { - MultipleImplicitConstructors( double ) {} - MultipleImplicitConstructors( int64_t ) {} - - bool operator==( MultipleImplicitConstructors ) const { return true; } - bool operator!=( MultipleImplicitConstructors ) const { return true; } - bool operator<( MultipleImplicitConstructors ) const { return true; } - bool operator<=( MultipleImplicitConstructors ) const { return true; } - bool operator>( MultipleImplicitConstructors ) const { return true; } - bool operator>=( MultipleImplicitConstructors ) const { return true; } - }; -} - -TEST_CASE("#2571 - tests compile types that have multiple implicit constructors from lit 0", - "[compilation][approvals]") { - MultipleImplicitConstructors mic1( 0.0 ); - MultipleImplicitConstructors mic2( 0.0 ); - REQUIRE( mic1 == mic2 ); - REQUIRE( mic1 != mic2 ); - REQUIRE( mic1 < mic2 ); - REQUIRE( mic1 <= mic2 ); - REQUIRE( mic1 > mic2 ); - REQUIRE( mic1 >= mic2 ); -} |