CatapultServer  v0.5.0.1 (Elephant)
catapult::utils::ImmutableValue< TValue > Class Template Reference

A move-only value wrapper. More...

Inheritance diagram for catapult::utils::ImmutableValue< TValue >:
Collaboration diagram for catapult::utils::ImmutableValue< TValue >:

Public Member Functions

constexpr ImmutableValue (TValue value)
 Creates an immutable value around value. More...
 
constexpr operator const TValue () const
 Casts this immutable value to a mutable value. More...
 
- Public Member Functions inherited from catapult::utils::MoveOnly
constexpr MoveOnly ()=default
 Default constructor. More...
 
 ~MoveOnly ()=default
 Default destructor. More...
 
 MoveOnly (const NonCopyable &)=delete
 Disabled copy constructor. More...
 
 MoveOnly (MoveOnly &&)=default
 Default move constructor. More...
 
MoveOnlyoperator= (const MoveOnly &)=delete
 Disabled assignment operator. More...
 
MoveOnlyoperator= (MoveOnly &&)=default
 Default move assignment operator. More...
 

Private Attributes

TValue m_value
 

Detailed Description

template<typename TValue>
class catapult::utils::ImmutableValue< TValue >

A move-only value wrapper.

Constructor & Destructor Documentation

◆ ImmutableValue()

template<typename TValue>
constexpr catapult::utils::ImmutableValue< TValue >::ImmutableValue ( TValue  value)
inlineexplicitconstexpr

Creates an immutable value around value.

Member Function Documentation

◆ operator const TValue()

template<typename TValue>
constexpr catapult::utils::ImmutableValue< TValue >::operator const TValue ( ) const
inlineconstexpr

Casts this immutable value to a mutable value.

Member Data Documentation

◆ m_value

template<typename TValue>
TValue catapult::utils::ImmutableValue< TValue >::m_value
private

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