Implement a simplified variant of std::unique_ptr<T>

This simplified variant supports only a subset of the functionality
in `std::unique_ptr<T>`. `Catch::Detail::unique_ptr<T>` only supports
single element pointer (no array support) with default deleter.

By removing the support for custom deleters, we also avoid requiring
significant machinery to support EBO, speeding up instantiations of
`unique_ptr<T>` significantly. Catch2 also currently does not need
to support `unique_ptr<T[]>`, so that is not supported either.
This commit is contained in:
Martin Hořeňovský committed 2020-05-31 15:08:47 +02:00
1 parent 66ab942903
commit 41bbaa6d57
14 files changed
+890 -8

No files matched your search

@@ -1380,6 +1380,6 @@ due to unexpected exception with message:
Why would you throw a std::string?
===============================================================================
test cases: 334 | 260 passed | 70 failed | 4 failed as expected
assertions: 1896 | 1744 passed | 131 failed | 21 failed as expected
test cases: 337 | 263 passed | 70 failed | 4 failed as expected
assertions: 1924 | 1772 passed | 131 failed | 21 failed as expected