|
@@ -16,7 +16,7 @@
|
|
|
*/
|
|
*/
|
|
|
template<class T>
|
|
template<class T>
|
|
|
ALWAYS_INLINE PointerTo<T>::
|
|
ALWAYS_INLINE PointerTo<T>::
|
|
|
-PointerTo(To *ptr) NOEXCEPT : PointerToBase<T>(ptr) {
|
|
|
|
|
|
|
+PointerTo(To *ptr) noexcept : PointerToBase<T>(ptr) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -29,13 +29,12 @@ PointerTo(const PointerTo<T> ©) :
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-#ifdef USE_MOVE_SEMANTICS
|
|
|
|
|
/**
|
|
/**
|
|
|
*
|
|
*
|
|
|
*/
|
|
*/
|
|
|
template<class T>
|
|
template<class T>
|
|
|
INLINE PointerTo<T>::
|
|
INLINE PointerTo<T>::
|
|
|
-PointerTo(PointerTo<T> &&from) NOEXCEPT :
|
|
|
|
|
|
|
+PointerTo(PointerTo<T> &&from) noexcept :
|
|
|
PointerToBase<T>(move(from))
|
|
PointerToBase<T>(move(from))
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
@@ -45,18 +44,17 @@ PointerTo(PointerTo<T> &&from) NOEXCEPT :
|
|
|
*/
|
|
*/
|
|
|
template<class T>
|
|
template<class T>
|
|
|
INLINE PointerTo<T> &PointerTo<T>::
|
|
INLINE PointerTo<T> &PointerTo<T>::
|
|
|
-operator = (PointerTo<T> &&from) NOEXCEPT {
|
|
|
|
|
|
|
+operator = (PointerTo<T> &&from) noexcept {
|
|
|
this->reassign(move(from));
|
|
this->reassign(move(from));
|
|
|
return *this;
|
|
return *this;
|
|
|
}
|
|
}
|
|
|
-#endif // USE_MOVE_SEMANTICS
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
*
|
|
*
|
|
|
*/
|
|
*/
|
|
|
template<class T>
|
|
template<class T>
|
|
|
-CONSTEXPR TYPENAME PointerTo<T>::To &PointerTo<T>::
|
|
|
|
|
-operator *() const NOEXCEPT {
|
|
|
|
|
|
|
+constexpr TYPENAME PointerTo<T>::To &PointerTo<T>::
|
|
|
|
|
+operator *() const noexcept {
|
|
|
return *((To *)(this->_void_ptr));
|
|
return *((To *)(this->_void_ptr));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -64,8 +62,8 @@ operator *() const NOEXCEPT {
|
|
|
*
|
|
*
|
|
|
*/
|
|
*/
|
|
|
template<class T>
|
|
template<class T>
|
|
|
-CONSTEXPR TYPENAME PointerTo<T>::To *PointerTo<T>::
|
|
|
|
|
-operator -> () const NOEXCEPT {
|
|
|
|
|
|
|
+constexpr TYPENAME PointerTo<T>::To *PointerTo<T>::
|
|
|
|
|
+operator -> () const noexcept {
|
|
|
return (To *)(this->_void_ptr);
|
|
return (To *)(this->_void_ptr);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -76,8 +74,8 @@ operator -> () const NOEXCEPT {
|
|
|
* goes because either will be correct.
|
|
* goes because either will be correct.
|
|
|
*/
|
|
*/
|
|
|
template<class T>
|
|
template<class T>
|
|
|
-CONSTEXPR PointerTo<T>::
|
|
|
|
|
-operator T * () const NOEXCEPT {
|
|
|
|
|
|
|
+constexpr PointerTo<T>::
|
|
|
|
|
+operator T * () const noexcept {
|
|
|
return (To *)(this->_void_ptr);
|
|
return (To *)(this->_void_ptr);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -99,8 +97,8 @@ cheat() {
|
|
|
* compiler problems, particularly for implicit upcasts.
|
|
* compiler problems, particularly for implicit upcasts.
|
|
|
*/
|
|
*/
|
|
|
template<class T>
|
|
template<class T>
|
|
|
-CONSTEXPR TYPENAME PointerTo<T>::To *PointerTo<T>::
|
|
|
|
|
-p() const NOEXCEPT {
|
|
|
|
|
|
|
+constexpr TYPENAME PointerTo<T>::To *PointerTo<T>::
|
|
|
|
|
+p() const noexcept {
|
|
|
return (To *)(this->_void_ptr);
|
|
return (To *)(this->_void_ptr);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -129,7 +127,7 @@ operator = (const PointerTo<T> ©) {
|
|
|
*/
|
|
*/
|
|
|
template<class T>
|
|
template<class T>
|
|
|
ALWAYS_INLINE ConstPointerTo<T>::
|
|
ALWAYS_INLINE ConstPointerTo<T>::
|
|
|
-ConstPointerTo(const TYPENAME ConstPointerTo<T>::To *ptr) NOEXCEPT :
|
|
|
|
|
|
|
+ConstPointerTo(const TYPENAME ConstPointerTo<T>::To *ptr) noexcept :
|
|
|
PointerToBase<T>((TYPENAME ConstPointerTo<T>::To *)ptr)
|
|
PointerToBase<T>((TYPENAME ConstPointerTo<T>::To *)ptr)
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
@@ -154,13 +152,12 @@ ConstPointerTo(const ConstPointerTo<T> ©) :
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-#ifdef USE_MOVE_SEMANTICS
|
|
|
|
|
/**
|
|
/**
|
|
|
*
|
|
*
|
|
|
*/
|
|
*/
|
|
|
template<class T>
|
|
template<class T>
|
|
|
INLINE ConstPointerTo<T>::
|
|
INLINE ConstPointerTo<T>::
|
|
|
-ConstPointerTo(PointerTo<T> &&from) NOEXCEPT :
|
|
|
|
|
|
|
+ConstPointerTo(PointerTo<T> &&from) noexcept :
|
|
|
PointerToBase<T>(move(from))
|
|
PointerToBase<T>(move(from))
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
@@ -170,7 +167,7 @@ ConstPointerTo(PointerTo<T> &&from) NOEXCEPT :
|
|
|
*/
|
|
*/
|
|
|
template<class T>
|
|
template<class T>
|
|
|
INLINE ConstPointerTo<T>::
|
|
INLINE ConstPointerTo<T>::
|
|
|
-ConstPointerTo(ConstPointerTo<T> &&from) NOEXCEPT :
|
|
|
|
|
|
|
+ConstPointerTo(ConstPointerTo<T> &&from) noexcept :
|
|
|
PointerToBase<T>(move(from))
|
|
PointerToBase<T>(move(from))
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
@@ -180,7 +177,7 @@ ConstPointerTo(ConstPointerTo<T> &&from) NOEXCEPT :
|
|
|
*/
|
|
*/
|
|
|
template<class T>
|
|
template<class T>
|
|
|
INLINE ConstPointerTo<T> &ConstPointerTo<T>::
|
|
INLINE ConstPointerTo<T> &ConstPointerTo<T>::
|
|
|
-operator = (PointerTo<T> &&from) NOEXCEPT {
|
|
|
|
|
|
|
+operator = (PointerTo<T> &&from) noexcept {
|
|
|
this->reassign(move(from));
|
|
this->reassign(move(from));
|
|
|
return *this;
|
|
return *this;
|
|
|
}
|
|
}
|
|
@@ -190,18 +187,17 @@ operator = (PointerTo<T> &&from) NOEXCEPT {
|
|
|
*/
|
|
*/
|
|
|
template<class T>
|
|
template<class T>
|
|
|
INLINE ConstPointerTo<T> &ConstPointerTo<T>::
|
|
INLINE ConstPointerTo<T> &ConstPointerTo<T>::
|
|
|
-operator = (ConstPointerTo<T> &&from) NOEXCEPT {
|
|
|
|
|
|
|
+operator = (ConstPointerTo<T> &&from) noexcept {
|
|
|
this->reassign(move(from));
|
|
this->reassign(move(from));
|
|
|
return *this;
|
|
return *this;
|
|
|
}
|
|
}
|
|
|
-#endif // USE_MOVE_SEMANTICS
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
*
|
|
*
|
|
|
*/
|
|
*/
|
|
|
template<class T>
|
|
template<class T>
|
|
|
-CONSTEXPR const TYPENAME ConstPointerTo<T>::To &ConstPointerTo<T>::
|
|
|
|
|
-operator *() const NOEXCEPT {
|
|
|
|
|
|
|
+constexpr const TYPENAME ConstPointerTo<T>::To &ConstPointerTo<T>::
|
|
|
|
|
+operator *() const noexcept {
|
|
|
return *((To *)(this->_void_ptr));
|
|
return *((To *)(this->_void_ptr));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -209,8 +205,8 @@ operator *() const NOEXCEPT {
|
|
|
*
|
|
*
|
|
|
*/
|
|
*/
|
|
|
template<class T>
|
|
template<class T>
|
|
|
-CONSTEXPR const TYPENAME ConstPointerTo<T>::To *ConstPointerTo<T>::
|
|
|
|
|
-operator -> () const NOEXCEPT {
|
|
|
|
|
|
|
+constexpr const TYPENAME ConstPointerTo<T>::To *ConstPointerTo<T>::
|
|
|
|
|
+operator -> () const noexcept {
|
|
|
return (To *)(this->_void_ptr);
|
|
return (To *)(this->_void_ptr);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -221,8 +217,8 @@ operator -> () const NOEXCEPT {
|
|
|
* don't care which way it goes because either will be correct.
|
|
* don't care which way it goes because either will be correct.
|
|
|
*/
|
|
*/
|
|
|
template<class T>
|
|
template<class T>
|
|
|
-CONSTEXPR ConstPointerTo<T>::
|
|
|
|
|
-operator const T * () const NOEXCEPT {
|
|
|
|
|
|
|
+constexpr ConstPointerTo<T>::
|
|
|
|
|
+operator const T * () const noexcept {
|
|
|
return (To *)(this->_void_ptr);
|
|
return (To *)(this->_void_ptr);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -244,8 +240,8 @@ cheat() {
|
|
|
* around compiler problems, particularly for implicit upcasts.
|
|
* around compiler problems, particularly for implicit upcasts.
|
|
|
*/
|
|
*/
|
|
|
template<class T>
|
|
template<class T>
|
|
|
-CONSTEXPR const TYPENAME ConstPointerTo<T>::To *ConstPointerTo<T>::
|
|
|
|
|
-p() const NOEXCEPT {
|
|
|
|
|
|
|
+constexpr const TYPENAME ConstPointerTo<T>::To *ConstPointerTo<T>::
|
|
|
|
|
+p() const noexcept {
|
|
|
return (To *)(this->_void_ptr);
|
|
return (To *)(this->_void_ptr);
|
|
|
}
|
|
}
|
|
|
|
|
|