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

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2/internal
diff options
context:
space:
mode:
authorMartin Hořeňovský2021-09-30 20:17:59 +0200
committerMartin Hořeňovský2021-09-30 20:17:59 +0200
commit77c7e9803eb841f7cec3ec5fa4c239fa091b62c2 (patch)
tree60a7e3ff14bc1ff8a4921c3364960a8369e46340 /src/catch2/internal
parent1d79683ea8d64b2f4fffc68c66624096595c3575 (diff)
downloadcatch3-77c7e9803eb841f7cec3ec5fa4c239fa091b62c2.tar.gz
Improve documentation on Detail::unique_ptr
Diffstat (limited to 'src/catch2/internal')
-rw-r--r--src/catch2/internal/catch_unique_ptr.hpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/catch2/internal/catch_unique_ptr.hpp b/src/catch2/internal/catch_unique_ptr.hpp
index 6200542b..237155d8 100644
--- a/src/catch2/internal/catch_unique_ptr.hpp
+++ b/src/catch2/internal/catch_unique_ptr.hpp
@@ -22,9 +22,12 @@
namespace Catch {
namespace Detail {
- // reimplementation of unique_ptr for improved compilation times
- // Does not support custom deleters (and thus does not require EBO)
- // Does not support arrays
+ /**
+ * A reimplementation of `std::unique_ptr` for improved compilation performance
+ *
+ * Does not support arrays nor custom deleters, but has trivial ABI
+ * when supposed by the compiler.
+ */
template <typename T>
class TRIVIAL_ABI unique_ptr {
T* m_ptr;
@@ -107,10 +110,7 @@ namespace Detail {
}
};
- // Purposefully doesn't exist
- // We could also rely on compiler warning + werror for calling plain delete
- // on a T[], but this seems better.
- // Maybe add definition and a static assert?
+ //! Specialization to cause compile-time error for arrays
template <typename T>
class unique_ptr<T[]>;