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

summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMartin Hořeňovský2022-01-05 00:04:21 +0100
committerMartin Hořeňovský2022-01-05 00:04:25 +0100
commitfff494c10ad223d8fe7732d227be9e3cede6097e (patch)
tree9ec3bce738b8d9c9703af265ecc5cb3e9b2a703f
parent103cb16696b7972e4f53aacea87f522ba63d2d31 (diff)
downloadcatch3-fff494c10ad223d8fe7732d227be9e3cede6097e.tar.gz
Tear out trivial_abi on unique_ptr
Turns out people are bad at not combining code compiled with GCC and Clang, and the improvement from `trivial_abi` on `unique_ptr` is not worth the maintenance cost of having this be an opt-in change. Closes #2344
-rw-r--r--src/catch2/internal/catch_unique_ptr.hpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/catch2/internal/catch_unique_ptr.hpp b/src/catch2/internal/catch_unique_ptr.hpp
index 9c54e92f..c453cde6 100644
--- a/src/catch2/internal/catch_unique_ptr.hpp
+++ b/src/catch2/internal/catch_unique_ptr.hpp
@@ -13,25 +13,15 @@
#include <catch2/internal/catch_move_and_forward.hpp>
-#if defined(__clang__) && defined(__has_attribute)
-# if __has_attribute(trivial_abi)
-# define TRIVIAL_ABI [[clang::trivial_abi]]
-# endif
-#endif
-#if !defined(TRIVIAL_ABI)
-# define TRIVIAL_ABI
-#endif
-
namespace Catch {
namespace Detail {
/**
* 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.
+ * Does not support arrays nor custom deleters.
*/
template <typename T>
- class TRIVIAL_ABI unique_ptr {
+ class unique_ptr {
T* m_ptr;
public:
constexpr unique_ptr(std::nullptr_t = nullptr):