83 this->reassign(std::move(from));
95 this->reassign(r.p());
104ALWAYS_INLINE PointerTo<T> &PointerTo<T>::
105operator = (PointerTo<Y> &&r)
noexcept {
106 this->reassign(std::move(r));
115constexpr typename PointerTo<T>::To &PointerTo<T>::
116operator *() const noexcept {
117 return *((To *)(this->_void_ptr));
126 return (
To *)(this->_void_ptr);
136constexpr PointerTo<T>::
137operator T * ()
const noexcept {
138 return (To *)(this->_void_ptr);
151 return (To *&)(this->_void_ptr);
161 return (To *)(this->_void_ptr);
188ALWAYS_INLINE ConstPointerTo<T>::
189ConstPointerTo(
const typename ConstPointerTo<T>::To *ptr) noexcept :
190 PointerToBase<T>((
typename ConstPointerTo<T>::To *)ptr)
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);
382constexpr ConstPointerTo<T>::
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.