Skip to content

Commit 07bac43

Browse files
committed
Fixed operator bool() not marked const
1 parent fe5491b commit 07bac43

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/oup/observable_unique_ptr.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ class observable_unique_ptr_base {
405405
/// Check if this pointer points to a valid object.
406406
/** \return `true` if the pointed object is valid, 'false' otherwise
407407
*/
408-
explicit operator bool() noexcept {
408+
explicit operator bool() const noexcept {
409409
return ptr_deleter.data != nullptr;
410410
}
411411
};
@@ -1233,7 +1233,7 @@ class observer_ptr {
12331233
/// Check if this pointer points to a valid object.
12341234
/** \return `true` if the pointed object is valid, 'false' otherwise
12351235
*/
1236-
explicit operator bool() noexcept {
1236+
explicit operator bool() const noexcept {
12371237
return block != nullptr && !block->expired();
12381238
}
12391239

0 commit comments

Comments
 (0)