Skip to content

Commit 0d142ac

Browse files
committed
Added static_assert for more unsupported cases
1 parent 2892f93 commit 0d142ac

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/oup/observable_unique_ptr.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -800,6 +800,8 @@ class basic_observable_ptr final {
800800
template<typename T, typename Policy, typename... Args>
801801
auto make_observable(Args&&... args) {
802802
static_assert(!std::is_reference_v<T>, "cannot create a pointer to a reference");
803+
static_assert(!std::is_array_v<T>, "cannot create a pointer to an array");
804+
static_assert(!std::is_void_v<T>, "cannot create a pointer to void");
803805

804806
using observer_policy = typename Policy::observer_policy;
805807
using control_block_type = basic_control_block<observer_policy>;

0 commit comments

Comments
 (0)