Skip to content

Commit 41a7cba

Browse files
committed
Added explicit checks against T[], which is not supported
1 parent c6ceee8 commit 41a7cba

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

include/oup/observable_unique_ptr.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,8 @@ class observable_unique_ptr :
450450
friend base;
451451

452452
public:
453+
static_assert(!std::is_array_v<T>, "T[] is not supported");
454+
453455
using typename base::element_type;
454456
using typename base::observer_type;
455457
using typename base::pointer;
@@ -682,6 +684,8 @@ class observable_sealed_ptr :
682684
friend base;
683685

684686
public:
687+
static_assert(!std::is_array_v<T>, "T[] is not supported");
688+
685689
using typename base::element_type;
686690
using typename base::observer_type;
687691
using typename base::pointer;
@@ -933,6 +937,8 @@ class observer_ptr {
933937
}
934938

935939
public:
940+
static_assert(!std::is_array_v<T>, "T[] is not supported");
941+
936942
/// Type of the pointed object
937943
using element_type = T;
938944

0 commit comments

Comments
 (0)