18 #include <type_traits>
36 template<
typename D,
typename S>
41 std::remove_pointer_t<
42 std::remove_reference_t<S>
48 std::conditional_t<is_source_const, const D, D>;
52 std::conditional_t<is_source_const, const D&, D&>;
56 std::conditional_t<is_source_const, const D*, D*>;
59 template<
typename D,
typename S>
62 template<
typename D,
typename S>
65 template<
typename D,
typename S>
typename const_clone< D, S >::pointer const_clone_ptr
typename const_clone< D, S >::reference const_clone_ref
typename const_clone< D, S >::type const_clone_t
Helper struct to clone the constness of one type to another.
std::conditional_t< is_source_const, const D, D > type
The destination type, possibly const qualified.
std::conditional_t< is_source_const, const D &, D & > reference
A reference to the destination type, possibly const qualified.
std::conditional_t< is_source_const, const D *, D * > pointer
A pointer to the destination type, possibly const qualified.
static const bool is_source_const