ReXGlue SDK
Loading...
Searching...
No Matches
rex::PropagateConst< T > Class Template Reference

#include <rex/utility.h>

Inheritance diagram for rex::PropagateConst< T >:
[legend]

Public Types

using element_type = std::remove_reference_t<decltype(*std::declval<T&>())>

Public Member Functions

 PropagateConst (T pointer) noexcept(std::is_nothrow_move_constructible_v< T >)
 PropagateConst (PropagateConst &&other) noexcept=default
PropagateConst & operator= (PropagateConst &&other) noexcept=default
PropagateConst & operator= (T pointer) noexcept(std::is_nothrow_move_assignable_v< T >)
element_type * get () noexcept
const element_type * get () const noexcept
element_type * operator-> () noexcept
const element_type * operator-> () const noexcept
element_type & operator* () noexcept
const element_type & operator* () const noexcept
 operator bool () const noexcept

Friends

bool operator== (const PropagateConst &value, std::nullptr_t) noexcept

Additional Inherited Members

Protected Member Functions inherited from rex::MoveOnly
 MoveOnly (MoveOnly &&)=default
MoveOnly & operator= (MoveOnly &&)=default
 MoveOnly (const MoveOnly &)=delete
MoveOnly & operator= (const MoveOnly &)=delete

Detailed Description

template<typename T>
class rex::PropagateConst< T >

Pointer wrapper whose pointee follows the const of its owner.

Template Parameters
TA raw pointer or a smart pointer such as std::unique_ptr.

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