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:
Cameron Gutman 2023-05-10 23:51:25 -05:00
parent f4bb410277
commit 1c83a44222

View File

@ -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;
}