Fix const reference and const pointer types in wrap_ptr
They were const refs to a T rather than a ref to a const T.
This commit is contained in:
@@ -687,7 +687,9 @@ namespace util {
|
|||||||
public:
|
public:
|
||||||
using element_type = T;
|
using element_type = T;
|
||||||
using pointer = element_type *;
|
using pointer = element_type *;
|
||||||
|
using const_pointer = element_type const *;
|
||||||
using reference = element_type &;
|
using reference = element_type &;
|
||||||
|
using const_reference = element_type const &;
|
||||||
|
|
||||||
wrap_ptr():
|
wrap_ptr():
|
||||||
_own_ptr { false }, _p { nullptr } {}
|
_own_ptr { false }, _p { nullptr } {}
|
||||||
@@ -744,7 +746,7 @@ namespace util {
|
|||||||
_own_ptr = false;
|
_own_ptr = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const reference
|
const_reference
|
||||||
operator*() const {
|
operator*() const {
|
||||||
return *_p;
|
return *_p;
|
||||||
}
|
}
|
||||||
@@ -752,7 +754,7 @@ namespace util {
|
|||||||
operator*() {
|
operator*() {
|
||||||
return *_p;
|
return *_p;
|
||||||
}
|
}
|
||||||
const pointer
|
const_pointer
|
||||||
operator->() const {
|
operator->() const {
|
||||||
return _p;
|
return _p;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user