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);
137operator T * ()
const noexcept {
138 return (To *)(this->_void_ptr);
151 return (To *&)(this->_void_ptr);
161 return (To *)(this->_void_ptr);
189ConstPointerTo(
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);
383operator
const T * ()
const noexcept {
384return (To *)(this->_void_ptr);
397 return (
const To *&)(this->_void_ptr);
407 return (To *)(this->_void_ptr);
416 this->reassign((To *)ptr);
A ConstPointerTo is similar to a PointerTo, except it keeps a const pointer to the thing.
constexpr const To * p() const noexcept
Returns an ordinary pointer instead of a ConstPointerTo.
const T *& cheat()
Returns a reference to the underlying pointer.
This is the base class for PointerTo and ConstPointerTo.
This file defines the classes PointerTo and ConstPointerTo (and their abbreviations,...
T *& cheat()
Returns a reference to the underlying pointer.
constexpr To * p() const noexcept
Returns an ordinary pointer instead of a PointerTo.