@@ -405,14 +405,26 @@ TEST_CASE( "#2555 - types that can only be compared with 0 literal implemented a
405405// have the ambiguity issue) for `==` and `!=`.
406406TEST_CASE ( " Comparing const instances of type registered with capture_by_value" ,
407407 " [regression][approvals][compilation]" ) {
408- auto const const_Lit0Type_1 = TypeWithLit0Comparisons{};
409- auto const const_Lit0Type_2 = TypeWithLit0Comparisons{};
410- REQUIRE ( const_Lit0Type_1 == const_Lit0Type_2 );
411- REQUIRE ( const_Lit0Type_1 <= const_Lit0Type_2 );
412- REQUIRE ( const_Lit0Type_1 < const_Lit0Type_2 );
413- REQUIRE ( const_Lit0Type_1 >= const_Lit0Type_2 );
414- REQUIRE ( const_Lit0Type_1 > const_Lit0Type_2 );
415- REQUIRE_FALSE ( const_Lit0Type_1 != const_Lit0Type_2 );
408+ SECTION (" Type with consteval-int constructor" ) {
409+ auto const const_Lit0Type_1 = TypeWithConstevalLit0Comparison{};
410+ auto const const_Lit0Type_2 = TypeWithConstevalLit0Comparison{};
411+ REQUIRE ( const_Lit0Type_1 == const_Lit0Type_2 );
412+ REQUIRE ( const_Lit0Type_1 <= const_Lit0Type_2 );
413+ REQUIRE ( const_Lit0Type_1 < const_Lit0Type_2 );
414+ REQUIRE ( const_Lit0Type_1 >= const_Lit0Type_2 );
415+ REQUIRE ( const_Lit0Type_1 > const_Lit0Type_2 );
416+ REQUIRE ( const_Lit0Type_1 != const_Lit0Type_2 );
417+ }
418+ SECTION (" Type with constexpr-int constructor" ) {
419+ auto const const_Lit0Type_1 = TypeWithLit0Comparisons{};
420+ auto const const_Lit0Type_2 = TypeWithLit0Comparisons{};
421+ REQUIRE ( const_Lit0Type_1 == const_Lit0Type_2 );
422+ REQUIRE ( const_Lit0Type_1 <= const_Lit0Type_2 );
423+ REQUIRE ( const_Lit0Type_1 < const_Lit0Type_2 );
424+ REQUIRE ( const_Lit0Type_1 >= const_Lit0Type_2 );
425+ REQUIRE ( const_Lit0Type_1 > const_Lit0Type_2 );
426+ REQUIRE ( const_Lit0Type_1 != const_Lit0Type_2 );
427+ }
416428}
417429
418430#endif // C++20 consteval
0 commit comments