Skip to content

Commit cd8f97e

Browse files
committed
Explicitly outline TestRegistry destructor into .cpp file
This fixes compilation issue with C++23 mode against libstdc++. Closes #2852
1 parent 05fb437 commit cd8f97e

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/catch2/internal/catch_test_case_registry_impl.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ namespace Catch {
123123
return getRegistryHub().getTestCaseRegistry().getAllTestsSorted( config );
124124
}
125125

126+
TestRegistry::~TestRegistry() = default;
127+
126128
void TestRegistry::registerTest(Detail::unique_ptr<TestCaseInfo> testInfo, Detail::unique_ptr<ITestInvoker> testInvoker) {
127129
m_handles.emplace_back(testInfo.get(), testInvoker.get());
128130
m_viewed_test_infos.push_back(testInfo.get());

src/catch2/internal/catch_test_case_registry_impl.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ namespace Catch {
3636
std::vector<TestCaseHandle> const& getAllTests() const override;
3737
std::vector<TestCaseHandle> const& getAllTestsSorted( IConfig const& config ) const override;
3838

39+
~TestRegistry() override; // = default
40+
3941
private:
4042
std::vector<Detail::unique_ptr<TestCaseInfo>> m_owned_test_infos;
4143
// Keeps a materialized vector for `getAllInfos`.

0 commit comments

Comments
 (0)