Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

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
Commit
fff494c10ad223d8fe7732d227be9e3cede6097e
Author
Martin Hořeňovský ·
Parents
103cb16696b7

Files · Download .tar.gz

Changes

 src/catch2/internal/catch_unique_ptr.hpp | 14 ++------------
 1 file 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):