PlayRho  1.1.0
An Interactive Real-Time-Oriented C++ Physics Engine & Library
playrho::propagate_const< T > Class Template Reference

Constant propagating template wrapper type. More...

#include <propagate_const.hpp>

Inheritance diagram for playrho::propagate_const< T >:
[legend]
Collaboration diagram for playrho::propagate_const< T >:
[legend]

Classes

struct  detect_element_type
 Element type detecting trait. More...
 
struct  detect_element_type< U * >
 Element type detecting trait. More...
 
struct  is_propagate_const
 Trait for detecting that the given type is not this one. More...
 
struct  is_propagate_const< propagate_const< U > >
 Trait for detecting that the given type is this one. More...
 

Public Types

using element_type = typename detect_element_type< T >::type
 Element type alias.
 

Public Member Functions

PROPAGATE_CONST_CONSTEXPR propagate_const ()=default
 Default constructor.
 
 propagate_const (const propagate_const &p)=delete
 Explicityly deleted copy constructor.
 
PROPAGATE_CONST_CONSTEXPR propagate_const (propagate_const &&p)=default
 Move constructor.
 
template<class U , std::enable_if_t<!std::is_convertible< U &&, T >::value &&std::is_constructible< T, U && >::value, bool > = true>
PROPAGATE_CONST_CONSTEXPR propagate_const (propagate_const< U > &&pu)
 Move constructor.
 
template<class U , std::enable_if_t< std::is_convertible< U &&, T >::value &&std::is_constructible< T, U && >::value, bool > = false>
PROPAGATE_CONST_CONSTEXPR propagate_const (propagate_const< U > &&pu)
 Move constructor.
 
template<class U , std::enable_if_t<!std::is_convertible< U &&, T >::value &&std::is_constructible< T, U && >::value &&!is_propagate_const< std::decay_t< U >>::value, bool > = true>
PROPAGATE_CONST_CONSTEXPR propagate_const (U &&u)
 Move constructor.
 
template<class U , std::enable_if_t< std::is_convertible< U &&, T >::value &&std::is_constructible< T, U && >::value &&!is_propagate_const< std::decay_t< U >>::value, bool > = false>
PROPAGATE_CONST_CONSTEXPR propagate_const (U &&u)
 Move constructor.
 
propagate_constoperator= (const propagate_const &p)=delete
 Explicitly deleted copy assignment.
 
PROPAGATE_CONST_CONSTEXPR propagate_constoperator= (propagate_const &&p)=default
 Move assignment operator.
 
template<class U >
PROPAGATE_CONST_CONSTEXPR propagate_constoperator= (propagate_const< U > &&pu)
 Move assignment operator for compatible propagate_const types.
 
template<class U , class = std::enable_if_t<!is_propagate_const<std::decay_t<U>>::value>>
PROPAGATE_CONST_CONSTEXPR propagate_constoperator= (U &&u)
 Move assignment operator for compatible types.
 
PROPAGATE_CONST_CONSTEXPR operator bool () const
 Boolean observer operator.
 
PROPAGATE_CONST_CONSTEXPR const element_typeoperator-> () const
 Member-of operator support.
 
template<class T_ = T, class U = std::enable_if_t<std::is_convertible< const T_, const element_type*>::value>>
PROPAGATE_CONST_CONSTEXPR operator const element_type * () const
 Const-conversion operator support.
 
PROPAGATE_CONST_CONSTEXPR const element_typeoperator* () const
 Indirection operator support.
 
PROPAGATE_CONST_CONSTEXPR const element_typeget () const
 Gets pointer content.
 
PROPAGATE_CONST_CONSTEXPR element_typeoperator-> ()
 Member-of operator support.
 
template<class T_ = T, class U = std::enable_if_t<std::is_convertible<T_, element_type*>::value>>
PROPAGATE_CONST_CONSTEXPR operator element_type * ()
 Indirection operator support.
 
PROPAGATE_CONST_CONSTEXPR element_typeoperator* ()
 Indirection operator support.
 
PROPAGATE_CONST_CONSTEXPR element_typeget ()
 Gets pointer content.
 
PROPAGATE_CONST_CONSTEXPR void swap (propagate_const &pt) noexcept(noexcept(swap(std::declval< T & >(), std::declval< T & >())))
 Swap support.
 

Static Private Member Functions

template<class U >
static element_typeget_pointer (U *u)
 Gets pointer.
 
template<class U >
static element_typeget_pointer (U &u)
 Gets pointer.
 
template<class U >
static const element_typeget_pointer (const U *u)
 Gets pointer.
 
template<class U >
static const element_typeget_pointer (const U &u)
 Gets pointer.
 

Private Attributes

t_
 Underlying data.
 

Friends

struct std::hash< propagate_const< T > >
 
struct std::equal_to< propagate_const< T > >
 
struct std::not_equal_to< propagate_const< T > >
 
struct std::greater< propagate_const< T > >
 
struct std::less< propagate_const< T > >
 
struct std::greater_equal< propagate_const< T > >
 
struct std::less_equal< propagate_const< T > >
 
PROPAGATE_CONST_CONSTEXPR bool operator== (const propagate_const &pt, std::nullptr_t)
 Equals operator.
 
PROPAGATE_CONST_CONSTEXPR bool operator== (std::nullptr_t, const propagate_const &pu)
 Equals operator.
 
PROPAGATE_CONST_CONSTEXPR bool operator!= (const propagate_const &pt, std::nullptr_t)
 Not-equals operator.
 
PROPAGATE_CONST_CONSTEXPR bool operator!= (std::nullptr_t, const propagate_const &pu)
 Not-equals operator.
 
template<class U >
PROPAGATE_CONST_CONSTEXPR bool operator== (const propagate_const &pt, const propagate_const< U > &pu)
 Equals operator.
 
template<class U >
PROPAGATE_CONST_CONSTEXPR bool operator!= (const propagate_const &pt, const propagate_const< U > &pu)
 Not-equals operator.
 
template<class U >
PROPAGATE_CONST_CONSTEXPR bool operator< (const propagate_const &pt, const propagate_const< U > &pu)
 Less-than operator.
 
template<class U >
PROPAGATE_CONST_CONSTEXPR bool operator> (const propagate_const &pt, const propagate_const< U > &pu)
 Greater-than operator.
 
template<class U >
PROPAGATE_CONST_CONSTEXPR bool operator<= (const propagate_const &pt, const propagate_const< U > &pu)
 Less-than or equal-to operator.
 
template<class U >
PROPAGATE_CONST_CONSTEXPR bool operator>= (const propagate_const &pt, const propagate_const< U > &pu)
 Greater-than or equal-to operator.
 
template<class U , class = std::enable_if_t<!is_propagate_const<std::decay_t<U>>::value>>
PROPAGATE_CONST_CONSTEXPR bool operator== (const propagate_const &pt, const U &u)
 Equals operator.
 
template<class U , class = std::enable_if_t<!is_propagate_const<std::decay_t<U>>::value>>
PROPAGATE_CONST_CONSTEXPR bool operator!= (const propagate_const &pt, const U &u)
 Not-equals operator.
 
template<class U , class = std::enable_if_t<!is_propagate_const<std::decay_t<U>>::value>>
PROPAGATE_CONST_CONSTEXPR bool operator< (const propagate_const &pt, const U &u)
 Less-than operator.
 
template<class U , class = std::enable_if_t<!is_propagate_const<std::decay_t<U>>::value>>
PROPAGATE_CONST_CONSTEXPR bool operator> (const propagate_const &pt, const U &u)
 Greater-than operator.
 
template<class U , class = std::enable_if_t<!is_propagate_const<std::decay_t<U>>::value>>
PROPAGATE_CONST_CONSTEXPR bool operator<= (const propagate_const &pt, const U &u)
 Less-than or equal-to operator.
 
template<class U , class = std::enable_if_t<!is_propagate_const<std::decay_t<U>>::value>>
PROPAGATE_CONST_CONSTEXPR bool operator>= (const propagate_const &pt, const U &u)
 Greater-than or equal-to operator.
 
template<class U , class = std::enable_if_t<!is_propagate_const<std::decay_t<U>>::value>>
PROPAGATE_CONST_CONSTEXPR bool operator== (const U &u, const propagate_const &pu)
 Equals operator.
 
template<class U , class = std::enable_if_t<!is_propagate_const<std::decay_t<U>>::value>>
PROPAGATE_CONST_CONSTEXPR bool operator!= (const U &u, const propagate_const &pu)
 Not-equals operator.
 
template<class U , class = std::enable_if_t<!is_propagate_const<std::decay_t<U>>::value>>
PROPAGATE_CONST_CONSTEXPR bool operator< (const U &u, const propagate_const &pu)
 Less-than operator.
 
template<class U , class = std::enable_if_t<!is_propagate_const<std::decay_t<U>>::value>>
PROPAGATE_CONST_CONSTEXPR bool operator> (const U &u, const propagate_const &pu)
 Greater-than operator.
 
template<class U , class = std::enable_if_t<!is_propagate_const<std::decay_t<U>>::value>>
PROPAGATE_CONST_CONSTEXPR bool operator<= (const U &u, const propagate_const &pu)
 Less-than or equal-to operator.
 
template<class U , class = std::enable_if_t<!is_propagate_const<std::decay_t<U>>::value>>
PROPAGATE_CONST_CONSTEXPR bool operator>= (const U &u, const propagate_const &pu)
 Greater-than or equal-to operator.
 

Detailed Description

template<class T>
class playrho::propagate_const< T >

Constant propagating template wrapper type.


The documentation for this class was generated from the following file: