Helper struct to clone the constness of one type to another. More...
#include <const_clone.hpp>
Public Types | |
using | type = std::conditional_t< is_source_const, const D, D > |
The destination type, possibly const qualified. More... | |
using | reference = std::conditional_t< is_source_const, const D &, D & > |
A reference to the destination type, possibly const qualified. More... | |
using | pointer = std::conditional_t< is_source_const, const D *, D * > |
A pointer to the destination type, possibly const qualified. More... | |
Static Public Attributes | |
static const bool | is_source_const |
Helper struct to clone the constness of one type to another.
*this
in a const member function is not a const object, use this
, which is a pointer to a const object.D | The destination type, it should have no cv-qualifier and not be a pointer or reference. |
S | The source type, this type may be a pointer or reference and obviously is allowed to have a cv-qualifier, although volatile has no effect. |
Definition at line 37 of file const_clone.hpp.
using utils::const_clone< D, S >::pointer = std::conditional_t<is_source_const, const D*, D*> |
A pointer to the destination type, possibly const qualified.
Definition at line 55 of file const_clone.hpp.
using utils::const_clone< D, S >::reference = std::conditional_t<is_source_const, const D&, D&> |
A reference to the destination type, possibly const qualified.
Definition at line 51 of file const_clone.hpp.
using utils::const_clone< D, S >::type = std::conditional_t<is_source_const, const D, D> |
The destination type, possibly const qualified.
Definition at line 47 of file const_clone.hpp.
|
static |
Definition at line 39 of file const_clone.hpp.