Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate headers for "extra" std types #2851

Open
amerry opened this issue Apr 3, 2024 · 0 comments
Open

Separate headers for "extra" std types #2851

amerry opened this issue Apr 3, 2024 · 0 comments

Comments

@amerry
Copy link
Contributor

amerry commented Apr 3, 2024

Description
Currently, to add stringification for std::optional, say, you need to define CATCH_CONFIG_ENABLE_OPTIONAL_STRINGMAKER. This can be tricky to get right with things like pre-compiled headers, unity builds, or other tricks to speed up the build, without dragging it into every single unit test file in the project.

Given Catch2v3 has already gone down the route of using separate headers for extra functionality, it would be useful to have this option here as well - put the relevant StringMaker specialisations into their own headers. That way, enabling formatted output of these types would just involve adding an extra #include, and it would work just fine with PCH, unity builds, etc.

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

No branches or pull requests

1 participant