summaryrefslogtreecommitdiffhomepage
path: root/compat
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-05-04 20:00:14 +0200
committerStanislaw Halik <sthalik@misaki.pl>2024-05-05 03:31:19 +0200
commitc8a6bf30bf7ae43a611f3cacbd77368d02dca575 (patch)
treee033124c8a578e9ee38882af77c778ed0e544352 /compat
parent3c4301fde92c625df6d95f5094b7eb655c613171 (diff)
a w
Diffstat (limited to 'compat')
-rw-r--r--compat/borrowed-ptr.cpp25
1 files changed, 8 insertions, 17 deletions
diff --git a/compat/borrowed-ptr.cpp b/compat/borrowed-ptr.cpp
index 9039a8db..c8582bfc 100644
--- a/compat/borrowed-ptr.cpp
+++ b/compat/borrowed-ptr.cpp
@@ -3,9 +3,12 @@
namespace floormat::detail_borrowed_ptr {
-#ifdef __GNUG__
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdelete-abstract-non-virtual-dtor"
+#elif defined __GNUG__
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdelete-abstract-non-virtual-dtor"
+#pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor"
#endif
void control_block_::decrement(control_block_*& blk) noexcept
{
@@ -20,22 +23,10 @@ void control_block_::decrement(control_block_*& blk) noexcept
blk = nullptr;
}
-#ifdef __GNUG__
+#ifdef __clang__
+#pragma clang diagnostic pop
+#elif defined __GNUG__
#pragma GCC diagnostic pop
#endif
} // namespace floormat::detail_borrowed_ptr
-
-namespace {
-struct Foo {};
-struct Bar : Foo {};
-struct Baz {};
-} // namespace
-
-namespace floormat {
-
-template struct detail_borrowed_ptr::control_block_impl<Foo>;
-template class bptr<Foo>;
-template bptr<Bar> static_pointer_cast(const bptr<Foo>&) noexcept;
-
-} // namespace floormat