83 this->reassign(std::move(from));
95 this->reassign(r.p());
106 this->reassign(std::move(r));
117 return *((To *)(this->_void_ptr));
126 return (To *)(this->_void_ptr);
137 operator T * ()
const noexcept {
138 return (To *)(this->_void_ptr);
151 return (To *&)(this->_void_ptr);
161 return (To *)(this->_void_ptr);
189 ConstPointerTo(
const typename ConstPointerTo<T>::To *ptr) noexcept :
297 this->reassign(std::move(from));
307 this->reassign(std::move(from));
319 this->reassign(r.p());
330 this->reassign((Y *)r.p());
341 this->reassign(std::move(r));
352 this->reassign(std::move(r));
363 return *((To *)(this->_void_ptr));
372 return (To *)(this->_void_ptr);
383 operator
const T * ()
const noexcept {
384 return (To *)(this->_void_ptr);
397 return (
const To *&)(this->_void_ptr);
407 return (To *)(this->_void_ptr);
416 this->reassign((To *)ptr);
constexpr To * p() const noexcept
Returns an ordinary pointer instead of a PointerTo.
const T *& cheat()
Returns a reference to the underlying pointer.
This is the base class for PointerTo and ConstPointerTo.
constexpr const To * p() const noexcept
Returns an ordinary pointer instead of a ConstPointerTo.
A ConstPointerTo is similar to a PointerTo, except it keeps a const pointer to the thing.
This file defines the classes PointerTo and ConstPointerTo (and their abbreviations,...
T *& cheat()
Returns a reference to the underlying pointer.