RawSpeed
fast raw decoding library
Loading...
Searching...
No Matches
rawspeed::Optional< T > Class Template Referencefinal

#include "adt/Optional.h"

Inheritance diagram for rawspeed::Optional< T >:
[legend]
Collaboration diagram for rawspeed::Optional< T >:
[legend]

Public Member Functions

 Optional ()=default
template<typename U = T>
requires (!std::same_as<U, Optional<T>> && !std::same_as<U, Optional<T>&> && !std::same_as<U, Optional<T> &&> && !std::same_as<U, std::optional<T>>)
 Optional (U &&value)
template<typename U = T>
requires (std::same_as<U, T>)
Optional< T > & operator= (U &&value)
template<typename... Args>
Templace (Args &&... args)
const Toperator-> () const
Toperator-> ()
const Toperator* () const &
Toperator* () &
T && operator* () &&
const T && operator* () const &&
bool has_value () const RAWSPEED_READNONE
 operator bool () const
template<typename U>
T value_or (U &&fallback) const &
void reset ()

Private Attributes

std::optional< Timpl

Detailed Description

template<typename T>
class rawspeed::Optional< T >

Definition at line 30 of file Optional.h.

Constructor & Destructor Documentation

◆ Optional() [1/2]

template<typename T>
rawspeed::Optional< T >::Optional ( )
default

Referenced by operator=().

Here is the caller graph for this function:

◆ Optional() [2/2]

template<typename T>
template<typename U = T>
requires (!std::same_as<U, Optional<T>> && !std::same_as<U, Optional<T>&> && !std::same_as<U, Optional<T> &&> && !std::same_as<U, std::optional<T>>)
rawspeed::Optional< T >::Optional ( U && value)
inline

Definition at line 42 of file Optional.h.

Member Function Documentation

◆ emplace()

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

Definition at line 51 of file Optional.h.

References impl, and rawspeed::T().

Referenced by rawspeed::anonymous_namespace{BitStreamerJPEGBenchmark.cpp}::BM(), and rawspeed::anonymous_namespace{BitVacuumerJPEGBenchmark.cpp}::BM().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ has_value()

template<typename T>
bool rawspeed::Optional< T >::has_value ( ) const
inlinenodiscard

Definition at line 85 of file Optional.h.

References impl.

Referenced by operator bool(), operator*(), operator*(), operator*(), operator*(), operator->(), operator->(), and rawspeed::operator==().

Here is the caller graph for this function:

◆ operator bool()

template<typename T>
rawspeed::Optional< T >::operator bool ( ) const
inlineexplicit

Definition at line 89 of file Optional.h.

References has_value().

Here is the call graph for this function:

◆ operator*() [1/4]

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

Definition at line 70 of file Optional.h.

References has_value(), impl, invariant, and rawspeed::T().

Here is the call graph for this function:

◆ operator*() [2/4]

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

Definition at line 75 of file Optional.h.

References has_value(), impl, invariant, and rawspeed::T().

Here is the call graph for this function:

◆ operator*() [3/4]

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

Definition at line 65 of file Optional.h.

References has_value(), impl, invariant, and rawspeed::T().

Here is the call graph for this function:

◆ operator*() [4/4]

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

Definition at line 80 of file Optional.h.

References has_value(), impl, invariant, and rawspeed::T().

Here is the call graph for this function:

◆ operator->() [1/2]

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

Definition at line 60 of file Optional.h.

References has_value(), impl, invariant, and rawspeed::T().

Here is the call graph for this function:

◆ operator->() [2/2]

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

Definition at line 55 of file Optional.h.

References has_value(), impl, invariant, and rawspeed::T().

Here is the call graph for this function:

◆ operator=()

template<typename T>
template<typename U = T>
requires (std::same_as<U, T>)
Optional< T > & rawspeed::Optional< T >::operator= ( U && value)
inline

Definition at line 46 of file Optional.h.

References Optional(), and impl.

Here is the call graph for this function:

◆ reset()

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

Definition at line 95 of file Optional.h.

References impl.

◆ value_or()

template<typename T>
template<typename U>
T rawspeed::Optional< T >::value_or ( U && fallback) const &
inline

Definition at line 91 of file Optional.h.

References impl, and rawspeed::T().

Here is the call graph for this function:

Member Data Documentation

◆ impl

template<typename T>
std::optional<T> rawspeed::Optional< T >::impl
private

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