You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Compilation fails when including <catch2/catch_message.hpp> and using the UNSCOPED_INFO macro.
Here is the error message:
[build] .../src/catch2/catch_message.hpp:112:12: error: 'getResultCapture' is not a member of 'Catch'; did you mean 'IResultCapture'?
[build] 112 | Catch::getResultCapture().emplaceUnscopedMessage( Catch::MessageBuilder( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info ) << log )
[build] | ^~~~~~~~~~~~~~~~
[build] .../src/catch2/catch_message.hpp:132:32: note: in expansion of macro 'INTERNAL_CATCH_UNSCOPED_INFO'
[build] 132 | #define UNSCOPED_INFO( msg ) INTERNAL_CATCH_UNSCOPED_INFO( "UNSCOPED_INFO", msg )
Expected behavior
It is expected that catch_message.hpp would include another header, e.g., interfaces/catch_interfaces_capture.hpp, so that the code will compile properly.
Platform information:
OS: Windows 10
Compiler+version: GCC v13.1.0 (x86_64-posix-seh-rev1, Built by MinGW-Builds project)
Catch version: v3.4.0
Additional context
If I don't use UNSCOPED_INFO, there is no compiler error.
The documentation does not specify that there are any other headers to be included for using UNSCOPED_INFO, and this use of interfaces seems to be an internal detail that user would never know.
The text was updated successfully, but these errors were encountered:
Interesting. This being issue in a macro, surrogate TUs can't catch this, as the bug doesn't happen until the macro is expanded. And in common usage, the missing include is covered by catch_test_macros.hpp instead.
Describe the bug
Compilation fails when including <catch2/catch_message.hpp> and using the UNSCOPED_INFO macro.
Here is the error message:
Expected behavior
It is expected that catch_message.hpp would include another header, e.g., interfaces/catch_interfaces_capture.hpp, so that the code will compile properly.
Platform information:
Additional context
If I don't use UNSCOPED_INFO, there is no compiler error.
The documentation does not specify that there are any other headers to be included for using UNSCOPED_INFO, and this use of interfaces seems to be an internal detail that user would never know.
The text was updated successfully, but these errors were encountered: