summaryrefslogtreecommitdiffhomepage
path: root/test/bptr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/bptr.cpp')
-rw-r--r--test/bptr.cpp31
1 files changed, 29 insertions, 2 deletions
diff --git a/test/bptr.cpp b/test/bptr.cpp
index b8e4bef1..99d6cd2c 100644
--- a/test/bptr.cpp
+++ b/test/bptr.cpp
@@ -4,10 +4,38 @@
namespace floormat {
-namespace { struct Foo {}; struct Bar : Foo {}; struct Baz {}; }
+namespace {
+struct Foo {};
+struct Bar : Foo {};
+struct Baz {};
+} // namespace
+
+// NOLINTBEGIN(*-use-anonymous-namespace)
+
template struct detail_borrowed_ptr::control_block_impl<Foo>;
+template struct detail_borrowed_ptr::control_block_impl<Bar>;
+template struct detail_borrowed_ptr::control_block_impl<Baz>;
+
+template bool operator==(const bptr<Foo>&, const bptr<Foo>&) noexcept;
+template bool operator==(const bptr<Bar>&, const bptr<Bar>&) noexcept;
+template bool operator==(const bptr<Baz>&, const bptr<Baz>&) noexcept;
+
template class bptr<Foo>;
+template class bptr<Bar>;
+template class bptr<Baz>;
+
+template bptr<Foo> static_pointer_cast(const bptr<Foo>&) noexcept;
+template bptr<Bar> static_pointer_cast(const bptr<Bar>&) noexcept;
+template bptr<Baz> static_pointer_cast(const bptr<Baz>&) noexcept;
+
template bptr<Bar> static_pointer_cast(const bptr<Foo>&) noexcept;
+template bptr<Foo> static_pointer_cast(const bptr<Bar>&) noexcept;
+
+//template bptr<Baz> static_pointer_cast(const bptr<Bar>&) noexcept; // must fail
+//template bptr<Foo> static_pointer_cast(const bptr<Baz>&) noexcept; // must fail
+//template bptr<Bar> static_pointer_cast(const bptr<Baz>&) noexcept; // must fail
+
+// NOLINTEND(*-use-anonymous-namespace)
namespace {
@@ -22,5 +50,4 @@ void test_app::test_bptr()
test1();
}
-
} // namespace floormat