JSON Voorhees
Killer JSON for C++
Loading...
Searching...
No Matches
jsonv::ok< TValue > Class Template Reference

A wrapper type for creating a result with result_state::ok. More...

#include <jsonv/result.hpp>

Public Types

using value_type = TValue
 

Public Member Functions

template<typename... TArgs>
constexpr ok (TArgs &&... args) noexcept(std::is_nothrow_constructible_v< value_type, TArgs... >)
 Create an instance from the given args.
 
const value_typeget () const &noexcept
 
value_typeget () &noexcept
 
value_type && get () &&noexcept
 

Detailed Description

template<typename TValue>
class jsonv::ok< TValue >

A wrapper type for creating a result with result_state::ok.

It is implicitly convertible to any result with a convertible-to value_type.

{
return ok(1);
}
An adapter for enumeration types.
A wrapper type for creating a result with result_state::ok.
Definition result.hpp:569
See also
result

Definition at line 568 of file result.hpp.

Member Typedef Documentation

◆ value_type

template<typename TValue >
using jsonv::ok< TValue >::value_type = TValue
See also
result::value_type

Definition at line 572 of file result.hpp.

Constructor & Destructor Documentation

◆ ok()

template<typename TValue >
template<typename... TArgs>
constexpr jsonv::ok< TValue >::ok ( TArgs &&...  args)
inlineexplicitconstexprnoexcept

Create an instance from the given args.

Definition at line 577 of file result.hpp.

Member Function Documentation

◆ get() [1/3]

template<typename TValue >
value_type && jsonv::ok< TValue >::get ( ) &&
inlinenoexcept

Definition at line 585 of file result.hpp.

◆ get() [2/3]

template<typename TValue >
value_type & jsonv::ok< TValue >::get ( ) &
inlinenoexcept

Definition at line 584 of file result.hpp.

◆ get() [3/3]

template<typename TValue >
const value_type & jsonv::ok< TValue >::get ( ) const &
inlinenoexcept

Get the value inside of this instance.

Definition at line 583 of file result.hpp.


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