Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QMaybe< Value, Error > Class Template Reference

#include <qmaybe_p.h>

+ Collaboration diagram for QMaybe< Value, Error >:

Public Member Functions

 QMaybe (const Value &v)
 
 QMaybe (Value &&v)
 
 QMaybe (const QMaybe &other)=default
 
QMaybeoperator= (const QMaybe &other)=default
 
 QMaybe (const Error &error)
 
template<class... Args>
 QMaybe (QUnexpect, Args &&...args)
 
constexpr operator bool () const noexcept
 
constexpr Value & value ()
 
constexpr const Value & value () const
 
constexpr Value * operator-> () noexcept
 
constexpr const Value * operator-> () const noexcept
 
constexpr Value & operator* () &noexcept
 
constexpr const Value & operator* () const &noexcept
 
constexpr const Errorerror () const
 

Detailed Description

template<typename Value, typename Error = QString>
class QMaybe< Value, Error >

Definition at line 33 of file qmaybe_p.h.

Constructor & Destructor Documentation

◆ QMaybe() [1/5]

template<typename Value , typename Error = QString>
QMaybe< Value, Error >::QMaybe ( const Value & v)
inline

Definition at line 36 of file qmaybe_p.h.

◆ QMaybe() [2/5]

template<typename Value , typename Error = QString>
QMaybe< Value, Error >::QMaybe ( Value && v)
inline

Definition at line 45 of file qmaybe_p.h.

◆ QMaybe() [3/5]

template<typename Value , typename Error = QString>
QMaybe< Value, Error >::QMaybe ( const QMaybe< Value, Error > & other)
default

◆ QMaybe() [4/5]

template<typename Value , typename Error = QString>
QMaybe< Value, Error >::QMaybe ( const Error & error)
inline

Definition at line 58 of file qmaybe_p.h.

◆ QMaybe() [5/5]

template<typename Value , typename Error = QString>
template<class... Args>
QMaybe< Value, Error >::QMaybe ( QUnexpect ,
Args &&... args )
inline

Definition at line 61 of file qmaybe_p.h.

References Error.

Member Function Documentation

◆ error()

template<typename Value , typename Error = QString>
constexpr const Error & QMaybe< Value, Error >::error ( ) const
inlineconstexpr

Definition at line 87 of file qmaybe_p.h.

Referenced by QFFmpegAudioDecoder::start().

+ Here is the caller graph for this function:

◆ operator bool()

template<typename Value , typename Error = QString>
constexpr QMaybe< Value, Error >::operator bool ( ) const
inlineexplicitconstexprnoexcept

Definition at line 67 of file qmaybe_p.h.

◆ operator*() [1/2]

template<typename Value , typename Error = QString>
constexpr Value & QMaybe< Value, Error >::operator* ( ) &
inlineconstexprnoexcept

Definition at line 84 of file qmaybe_p.h.

References QMaybe< Value, Error >::value().

+ Here is the call graph for this function:

◆ operator*() [2/2]

template<typename Value , typename Error = QString>
constexpr const Value & QMaybe< Value, Error >::operator* ( ) const &
inlineconstexprnoexcept

Definition at line 85 of file qmaybe_p.h.

References QMaybe< Value, Error >::value().

+ Here is the call graph for this function:

◆ operator->() [1/2]

template<typename Value , typename Error = QString>
constexpr const Value * QMaybe< Value, Error >::operator-> ( ) const
inlineconstexprnoexcept

Definition at line 82 of file qmaybe_p.h.

References QMaybe< Value, Error >::value().

+ Here is the call graph for this function:

◆ operator->() [2/2]

template<typename Value , typename Error = QString>
constexpr Value * QMaybe< Value, Error >::operator-> ( )
inlineconstexprnoexcept

Definition at line 81 of file qmaybe_p.h.

References QMaybe< Value, Error >::value().

+ Here is the call graph for this function:

◆ operator=()

template<typename Value , typename Error = QString>
QMaybe & QMaybe< Value, Error >::operator= ( const QMaybe< Value, Error > & other)
default

◆ value() [1/2]

template<typename Value , typename Error = QString>
constexpr Value & QMaybe< Value, Error >::value ( )
inlineconstexpr

Definition at line 69 of file qmaybe_p.h.

References Q_ASSERT.

Referenced by QMaybe< Value, Error >::operator*(), QMaybe< Value, Error >::operator*(), QMaybe< Value, Error >::operator->(), QMaybe< Value, Error >::operator->(), and QFFmpegAudioDecoder::start().

+ Here is the caller graph for this function:

◆ value() [2/2]

template<typename Value , typename Error = QString>
constexpr const Value & QMaybe< Value, Error >::value ( ) const
inlineconstexpr

Definition at line 75 of file qmaybe_p.h.

References Q_ASSERT.


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