Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/tests/SelfTest/UsageTests/ToStringVector.tests.cpp
diff options
context:
space:
mode:
authorMartin Hořeňovský2026-04-08 10:26:57 +0200
committerMartin Hořeňovský2026-04-08 12:57:09 +0200
commit47200ddbee03eaf4a9d3d99d18cb692381d8f5bc (patch)
treeec947545e5f35b38ea5592c6fafcd7861081648c /tests/SelfTest/UsageTests/ToStringVector.tests.cpp
parente51dcdcc595371828de2b1d28985e8d8c1895345 (diff)
downloadcatch3-47200ddbee03eaf4a9d3d99d18cb692381d8f5bc.tar.gz
Rework internals of CATCH_REGISTER_ENUM
The old internals reached into the global hub to stash the allocation(s) for enum value -> string value there, then kept around a potentially invalid (in case the hub was cleaned up) reference into it, going through whole bunch of virtual dispatch in the process. The new internals just store the data in a static variable inside the `StringMaker` specialization. This avoids potential lifetime issues, avoids all virtual dispatch and (almost) reduces the include bloat in the main header path. The reason for (almost) there is that for full include correctness, `EnumInfo` needs `<utility>` include for `std::pair`. However, this brings in things like `std::relops`, because the std headers in C++ are dumb. As this was not included before, and instead we relied on `std::pair` existing in an internal stdlib header that we transitively included, the full include size ends up bigger than before.
Diffstat (limited to 'tests/SelfTest/UsageTests/ToStringVector.tests.cpp')
0 files changed, 0 insertions, 0 deletions