Skip to content

Restore global comparison lookup in assertions - #3245

Draft
17kaushalsingh wants to merge 1 commit into
catchorg:develfrom
17kaushalsingh:fix/3221-equality-lookup
Draft

17kaushalsingh wants to merge 1 commit into
catchorg:develfrom
17kaushalsingh:fix/3221-equality-lookup

Conversation

@17kaushalsingh

Copy link
Copy Markdown

Description

Restore compilation of assertions using global comparison operators declared before Catch2 headers. Evaluate comparisons through helpers declared before the namespace-scope decomposition operators hide global overloads; retain lvalue operands and literal-zero fallbacks.

Related existing proposal: #3222 by @michaelbawuah. This uses the same early-lookup helper design, with lvalue-reference parameters and a compact regression covering all six comparisons, temporary operands, and literal-zero comparisons in both directions. Submitted as a draft because the proposals overlap and this has not been validated on Windows.

Validation

  • New regression translation unit fails to compile before the production change and compiles afterward.
  • AppleClang 21, C++14 Debug basic-tests build: all 82 CTest checks passed.
  • Final focused regression: 18 assertions passed.
  • C++20 syntax checks passed for Compilation.tests.cpp and Decomposition.tests.cpp.
  • git diff --check passed.

GitHub Issues

Closes #3221.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Commit b710039 breaks tests with overloaded operator==

1 participant