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:
parent
f4bb410277
commit
1c83a44222
1 changed files with 4 additions and 2 deletions
|
|
@ -687,7 +687,9 @@ namespace util {
|
|||
public:
|
||||
using element_type = T;
|
||||
using pointer = element_type *;
|
||||
using const_pointer = element_type const *;
|
||||
using reference = element_type &;
|
||||
using const_reference = element_type const &;
|
||||
|
||||
wrap_ptr():
|
||||
_own_ptr { false }, _p { nullptr } {}
|
||||
|
|
@ -744,7 +746,7 @@ namespace util {
|
|||
_own_ptr = false;
|
||||
}
|
||||
|
||||
const reference
|
||||
const_reference
|
||||
operator*() const {
|
||||
return *_p;
|
||||
}
|
||||
|
|
@ -752,7 +754,7 @@ namespace util {
|
|||
operator*() {
|
||||
return *_p;
|
||||
}
|
||||
const pointer
|
||||
const_pointer
|
||||
operator->() const {
|
||||
return _p;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue