mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-01 21:05:39 +02:00
Revert "Fix old GCC + types with ambiguous constructor from 0"
This reverts commit 291c502f66
.
The issue is that it breaks under C++20 for some reason.
This commit is contained in:
@@ -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 );
|
||||
}
|
||||
|
Reference in New Issue
Block a user