aws-crt-cpp
C++ wrapper around the aws-c-* libraries. Provides Cross-Platform Transport Protocols and SSL/TLS implementations for C++.
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
Aws::Crt::Optional< T > Class Template Reference

#include <Optional.h>

Public Types

using ValueType = T
 

Public Member Functions

 Optional ()
 
 Optional (const T &val)
 
 Optional (T &&val)
 
 ~Optional ()
 
template<typename U = T, typename std::enable_if< !IsSpecializationOf< typename std::decay< U >::type, Aws::Crt::Optional >::value, bool >::type = true>
Optionaloperator= (U &&u)
 
 Optional (const Optional< T > &other)
 
 Optional (Optional< T > &&other)
 
template<typename... Args>
 Optional (Aws::Crt::InPlaceT, Args &&...args)
 
Optional< T > & operator= (const Optional &other)
 
template<typename U = T>
Optional< T > & operator= (const Optional< U > &other)
 
template<typename U = T>
Optional< T > & operator= (Optional< U > &&other)
 
template<typename... Args>
Templace (Args &&...args)
 
const Toperator-> () const
 
Toperator-> ()
 
const Toperator* () const &
 
Toperator* () &
 
const T && operator* () const &&
 
T && operator* () &&
 
 operator bool () const noexcept
 
bool has_value () const noexcept
 
Tvalue () &
 
const Tvalue () const &
 
T && value () &&
 
const T && value () const &&
 
void reset ()
 

Detailed Description

template<typename T>
class Aws::Crt::Optional< T >

Custom implementation of an Option type. std::optional requires C++17

Template Parameters
Ttype of the optional value

Member Typedef Documentation

◆ ValueType

template<typename T >
using Aws::Crt::Optional< T >::ValueType = T

Constructor & Destructor Documentation

◆ Optional() [1/6]

template<typename T >
Aws::Crt::Optional< T >::Optional ( )
inline

◆ Optional() [2/6]

template<typename T >
Aws::Crt::Optional< T >::Optional ( const T val)
inline

◆ Optional() [3/6]

template<typename T >
Aws::Crt::Optional< T >::Optional ( T &&  val)
inline

◆ ~Optional()

template<typename T >
Aws::Crt::Optional< T >::~Optional ( )
inline

◆ Optional() [4/6]

template<typename T >
Aws::Crt::Optional< T >::Optional ( const Optional< T > &  other)
inline

◆ Optional() [5/6]

template<typename T >
Aws::Crt::Optional< T >::Optional ( Optional< T > &&  other)
inline

◆ Optional() [6/6]

template<typename T >
template<typename... Args>
Aws::Crt::Optional< T >::Optional ( Aws::Crt::InPlaceT  ,
Args &&...  args 
)
inlineexplicit

Member Function Documentation

◆ emplace()

template<typename T >
template<typename... Args>
T & Aws::Crt::Optional< T >::emplace ( Args &&...  args)
inline

◆ has_value()

template<typename T >
bool Aws::Crt::Optional< T >::has_value ( ) const
inlinenoexcept

◆ operator bool()

template<typename T >
Aws::Crt::Optional< T >::operator bool ( ) const
inlineexplicitnoexcept

◆ operator*() [1/4]

template<typename T >
T & Aws::Crt::Optional< T >::operator* ( ) &
inline

◆ operator*() [2/4]

template<typename T >
T && Aws::Crt::Optional< T >::operator* ( ) &&
inline

◆ operator*() [3/4]

template<typename T >
const T & Aws::Crt::Optional< T >::operator* ( ) const &
inline

◆ operator*() [4/4]

template<typename T >
const T && Aws::Crt::Optional< T >::operator* ( ) const &&
inline

◆ operator->() [1/2]

template<typename T >
T * Aws::Crt::Optional< T >::operator-> ( )
inline

◆ operator->() [2/2]

template<typename T >
const T * Aws::Crt::Optional< T >::operator-> ( ) const
inline

◆ operator=() [1/4]

template<typename T >
Optional< T > & Aws::Crt::Optional< T >::operator= ( const Optional< T > &  other)
inline

◆ operator=() [2/4]

template<typename T >
template<typename U = T>
Optional< T > & Aws::Crt::Optional< T >::operator= ( const Optional< U > &  other)
inline

◆ operator=() [3/4]

template<typename T >
template<typename U = T>
Optional< T > & Aws::Crt::Optional< T >::operator= ( Optional< U > &&  other)
inline

◆ operator=() [4/4]

template<typename T >
template<typename U = T, typename std::enable_if< !IsSpecializationOf< typename std::decay< U >::type, Aws::Crt::Optional >::value, bool >::type = true>
Optional & Aws::Crt::Optional< T >::operator= ( U &&  u)
inline

Assignment operator for a case when the parameter type is not Optional.

◆ reset()

template<typename T >
void Aws::Crt::Optional< T >::reset ( )
inline

◆ value() [1/4]

template<typename T >
T & Aws::Crt::Optional< T >::value ( ) &
inline

◆ value() [2/4]

template<typename T >
T && Aws::Crt::Optional< T >::value ( ) &&
inline

◆ value() [3/4]

template<typename T >
const T & Aws::Crt::Optional< T >::value ( ) const &
inline

◆ value() [4/4]

template<typename T >
const T && Aws::Crt::Optional< T >::value ( ) const &&
inline

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