ROSE 0.11.145.147
Public Types | Public Member Functions | List of all members
Sawyer::Ok< T > Class Template Reference

Description

template<class T>
class Sawyer::Ok< T >

Success value.

Definition at line 35 of file Result.h.

#include <Sawyer/Result.h>

Public Types

using Value = T
 

Public Member Functions

 Ok (const Ok &other)
 Copy constructor.
 
 Ok (const Value &ok)
 Construct from an value.
 
const Value & operator* () const
 Dereference to obtain value.
 
const Value * operator-> () const
 Dereference to obtain pointer.
 
Okoperator= (const Ok &other)
 Assignment.
 
Okoperator= (const Value &ok)
 Assignment.
 

Member Typedef Documentation

◆ Value

template<class T >
using Sawyer::Ok< T >::Value = T

Definition at line 37 of file Result.h.

Constructor & Destructor Documentation

◆ Ok() [1/2]

template<class T >
Sawyer::Ok< T >::Ok ( const Ok< T > &  other)
inline

Copy constructor.

Definition at line 66 of file Result.h.

◆ Ok() [2/2]

template<class T >
Sawyer::Ok< T >::Ok ( const Value &  ok)
inlineexplicit

Construct from an value.

Definition at line 70 of file Result.h.

Member Function Documentation

◆ operator=() [1/2]

template<class T >
Ok & Sawyer::Ok< T >::operator= ( const Ok< T > &  other)
inline

Assignment.

Definition at line 76 of file Result.h.

◆ operator=() [2/2]

template<class T >
Ok & Sawyer::Ok< T >::operator= ( const Value &  ok)
inline

Assignment.

Definition at line 80 of file Result.h.

◆ operator*()

template<class T >
const Value & Sawyer::Ok< T >::operator* ( ) const
inline

Dereference to obtain value.

Definition at line 87 of file Result.h.

◆ operator->()

template<class T >
const Value * Sawyer::Ok< T >::operator-> ( ) const
inline

Dereference to obtain pointer.

Definition at line 92 of file Result.h.


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