From fff494c10ad223d8fe7732d227be9e3cede6097e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Wed, 5 Jan 2022 00:04:21 +0100 Subject: [PATCH] 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 --- 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 -#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 - class TRIVIAL_ABI unique_ptr { + class unique_ptr { T* m_ptr; public: constexpr unique_ptr(std::nullptr_t = nullptr):