LLVM  15.0.0git
Public Member Functions | List of all members
llvm::optional_detail::OptionalStorage< T, bool > Class Template Reference

Storage for any type. More...

#include "llvm/ADT/Optional.h"

Collaboration diagram for llvm::optional_detail::OptionalStorage< T, bool >:
Collaboration graph
[legend]

Public Member Functions

 ~OptionalStorage ()
 
constexpr OptionalStorage () noexcept
 
constexpr OptionalStorage (OptionalStorage const &other)
 
constexpr OptionalStorage (OptionalStorage &&other)
 
template<class... Args>
constexpr OptionalStorage (in_place_t, Args &&...args)
 
void reset () noexcept
 
constexpr bool has_value () const noexcept
 
constexpr bool hasValue () const noexcept
 
Tvalue () &noexcept
 
TgetValue () &noexcept
 
constexpr const Tvalue () const &noexcept
 
constexpr const TgetValue () const &noexcept
 
T && value () &&noexcept
 
T && getValue () &&noexcept
 
template<class... Args>
void emplace (Args &&...args)
 
OptionalStorageoperator= (T const &y)
 
OptionalStorageoperator= (T &&y)
 
OptionalStorageoperator= (OptionalStorage const &other)
 
OptionalStorageoperator= (OptionalStorage &&other)
 

Detailed Description

template<typename T, bool = (llvm::is_trivially_copy_constructible<T>::value && std::is_trivially_copy_assignable<T>::value && (llvm::is_trivially_move_constructible<T>::value || !std::is_move_constructible<T>::value) && (std::is_trivially_move_assignable<T>::value || !std::is_move_assignable<T>::value))>
class llvm::optional_detail::OptionalStorage< T, bool >

Storage for any type.

Definition at line 60 of file Optional.h.

Constructor & Destructor Documentation

◆ ~OptionalStorage()

template<typename T , bool = (llvm::is_trivially_copy_constructible<T>::value && std::is_trivially_copy_assignable<T>::value && (llvm::is_trivially_move_constructible<T>::value || !std::is_move_constructible<T>::value) && (std::is_trivially_move_assignable<T>::value || !std::is_move_assignable<T>::value))>
llvm::optional_detail::OptionalStorage< T, bool >::~OptionalStorage ( )
inline

Definition at line 68 of file Optional.h.

◆ OptionalStorage() [1/4]

template<typename T , bool = (llvm::is_trivially_copy_constructible<T>::value && std::is_trivially_copy_assignable<T>::value && (llvm::is_trivially_move_constructible<T>::value || !std::is_move_constructible<T>::value) && (std::is_trivially_move_assignable<T>::value || !std::is_move_assignable<T>::value))>
constexpr llvm::optional_detail::OptionalStorage< T, bool >::OptionalStorage ( )
inlineconstexprnoexcept

Definition at line 70 of file Optional.h.

◆ OptionalStorage() [2/4]

template<typename T , bool = (llvm::is_trivially_copy_constructible<T>::value && std::is_trivially_copy_assignable<T>::value && (llvm::is_trivially_move_constructible<T>::value || !std::is_move_constructible<T>::value) && (std::is_trivially_move_assignable<T>::value || !std::is_move_assignable<T>::value))>
constexpr llvm::optional_detail::OptionalStorage< T, bool >::OptionalStorage ( OptionalStorage< T, bool > const other)
inlineconstexpr

Definition at line 72 of file Optional.h.

◆ OptionalStorage() [3/4]

template<typename T , bool = (llvm::is_trivially_copy_constructible<T>::value && std::is_trivially_copy_assignable<T>::value && (llvm::is_trivially_move_constructible<T>::value || !std::is_move_constructible<T>::value) && (std::is_trivially_move_assignable<T>::value || !std::is_move_assignable<T>::value))>
constexpr llvm::optional_detail::OptionalStorage< T, bool >::OptionalStorage ( OptionalStorage< T, bool > &&  other)
inlineconstexpr

Definition at line 77 of file Optional.h.

◆ OptionalStorage() [4/4]

template<typename T , bool = (llvm::is_trivially_copy_constructible<T>::value && std::is_trivially_copy_assignable<T>::value && (llvm::is_trivially_move_constructible<T>::value || !std::is_move_constructible<T>::value) && (std::is_trivially_move_assignable<T>::value || !std::is_move_assignable<T>::value))>
template<class... Args>
constexpr llvm::optional_detail::OptionalStorage< T, bool >::OptionalStorage ( in_place_t  ,
Args &&...  args 
)
inlineexplicitconstexpr

Definition at line 84 of file Optional.h.

Member Function Documentation

◆ emplace()

template<typename T , bool = (llvm::is_trivially_copy_constructible<T>::value && std::is_trivially_copy_assignable<T>::value && (llvm::is_trivially_move_constructible<T>::value || !std::is_move_constructible<T>::value) && (std::is_trivially_move_assignable<T>::value || !std::is_move_assignable<T>::value))>
template<class... Args>
void llvm::optional_detail::OptionalStorage< T, bool >::emplace ( Args &&...  args)
inline

Definition at line 122 of file Optional.h.

◆ getValue() [1/3]

template<typename T , bool = (llvm::is_trivially_copy_constructible<T>::value && std::is_trivially_copy_assignable<T>::value && (llvm::is_trivially_move_constructible<T>::value || !std::is_move_constructible<T>::value) && (std::is_trivially_move_assignable<T>::value || !std::is_move_assignable<T>::value))>
T&& llvm::optional_detail::OptionalStorage< T, bool >::getValue ( ) &&
inlinenoexcept

Definition at line 117 of file Optional.h.

◆ getValue() [2/3]

template<typename T , bool = (llvm::is_trivially_copy_constructible<T>::value && std::is_trivially_copy_assignable<T>::value && (llvm::is_trivially_move_constructible<T>::value || !std::is_move_constructible<T>::value) && (std::is_trivially_move_assignable<T>::value || !std::is_move_assignable<T>::value))>
T& llvm::optional_detail::OptionalStorage< T, bool >::getValue ( ) &
inlinenoexcept

Definition at line 101 of file Optional.h.

◆ getValue() [3/3]

template<typename T , bool = (llvm::is_trivially_copy_constructible<T>::value && std::is_trivially_copy_assignable<T>::value && (llvm::is_trivially_move_constructible<T>::value || !std::is_move_constructible<T>::value) && (std::is_trivially_move_assignable<T>::value || !std::is_move_assignable<T>::value))>
constexpr const T& llvm::optional_detail::OptionalStorage< T, bool >::getValue ( ) const &
inlineconstexprnoexcept

Definition at line 109 of file Optional.h.

◆ has_value()

template<typename T , bool = (llvm::is_trivially_copy_constructible<T>::value && std::is_trivially_copy_assignable<T>::value && (llvm::is_trivially_move_constructible<T>::value || !std::is_move_constructible<T>::value) && (std::is_trivially_move_assignable<T>::value || !std::is_move_assignable<T>::value))>
constexpr bool llvm::optional_detail::OptionalStorage< T, bool >::has_value ( ) const
inlineconstexprnoexcept

◆ hasValue()

template<typename T , bool = (llvm::is_trivially_copy_constructible<T>::value && std::is_trivially_copy_assignable<T>::value && (llvm::is_trivially_move_constructible<T>::value || !std::is_move_constructible<T>::value) && (std::is_trivially_move_assignable<T>::value || !std::is_move_assignable<T>::value))>
constexpr bool llvm::optional_detail::OptionalStorage< T, bool >::hasValue ( ) const
inlineconstexprnoexcept

Definition at line 95 of file Optional.h.

◆ operator=() [1/4]

template<typename T , bool = (llvm::is_trivially_copy_constructible<T>::value && std::is_trivially_copy_assignable<T>::value && (llvm::is_trivially_move_constructible<T>::value || !std::is_move_constructible<T>::value) && (std::is_trivially_move_assignable<T>::value || !std::is_move_assignable<T>::value))>
OptionalStorage& llvm::optional_detail::OptionalStorage< T, bool >::operator= ( OptionalStorage< T, bool > &&  other)
inline

Definition at line 161 of file Optional.h.

◆ operator=() [2/4]

template<typename T , bool = (llvm::is_trivially_copy_constructible<T>::value && std::is_trivially_copy_assignable<T>::value && (llvm::is_trivially_move_constructible<T>::value || !std::is_move_constructible<T>::value) && (std::is_trivially_move_assignable<T>::value || !std::is_move_assignable<T>::value))>
OptionalStorage& llvm::optional_detail::OptionalStorage< T, bool >::operator= ( OptionalStorage< T, bool > const other)
inline

Definition at line 147 of file Optional.h.

◆ operator=() [3/4]

template<typename T , bool = (llvm::is_trivially_copy_constructible<T>::value && std::is_trivially_copy_assignable<T>::value && (llvm::is_trivially_move_constructible<T>::value || !std::is_move_constructible<T>::value) && (std::is_trivially_move_assignable<T>::value || !std::is_move_assignable<T>::value))>
OptionalStorage& llvm::optional_detail::OptionalStorage< T, bool >::operator= ( T &&  y)
inline

Definition at line 137 of file Optional.h.

◆ operator=() [4/4]

template<typename T , bool = (llvm::is_trivially_copy_constructible<T>::value && std::is_trivially_copy_assignable<T>::value && (llvm::is_trivially_move_constructible<T>::value || !std::is_move_constructible<T>::value) && (std::is_trivially_move_assignable<T>::value || !std::is_move_assignable<T>::value))>
OptionalStorage& llvm::optional_detail::OptionalStorage< T, bool >::operator= ( T const y)
inline

Definition at line 128 of file Optional.h.

◆ reset()

template<typename T , bool = (llvm::is_trivially_copy_constructible<T>::value && std::is_trivially_copy_assignable<T>::value && (llvm::is_trivially_move_constructible<T>::value || !std::is_move_constructible<T>::value) && (std::is_trivially_move_assignable<T>::value || !std::is_move_assignable<T>::value))>
void llvm::optional_detail::OptionalStorage< T, bool >::reset ( )
inlinenoexcept

◆ value() [1/3]

template<typename T , bool = (llvm::is_trivially_copy_constructible<T>::value && std::is_trivially_copy_assignable<T>::value && (llvm::is_trivially_move_constructible<T>::value || !std::is_move_constructible<T>::value) && (std::is_trivially_move_assignable<T>::value || !std::is_move_assignable<T>::value))>
T&& llvm::optional_detail::OptionalStorage< T, bool >::value ( ) &&
inlinenoexcept

Definition at line 113 of file Optional.h.

◆ value() [2/3]

template<typename T , bool = (llvm::is_trivially_copy_constructible<T>::value && std::is_trivially_copy_assignable<T>::value && (llvm::is_trivially_move_constructible<T>::value || !std::is_move_constructible<T>::value) && (std::is_trivially_move_assignable<T>::value || !std::is_move_assignable<T>::value))>
T& llvm::optional_detail::OptionalStorage< T, bool >::value ( ) &
inlinenoexcept

Definition at line 97 of file Optional.h.

◆ value() [3/3]

template<typename T , bool = (llvm::is_trivially_copy_constructible<T>::value && std::is_trivially_copy_assignable<T>::value && (llvm::is_trivially_move_constructible<T>::value || !std::is_move_constructible<T>::value) && (std::is_trivially_move_assignable<T>::value || !std::is_move_assignable<T>::value))>
constexpr const T& llvm::optional_detail::OptionalStorage< T, bool >::value ( ) const &
inlineconstexprnoexcept

Definition at line 105 of file Optional.h.

Member Data Documentation

◆ empty

template<typename T , bool = (llvm::is_trivially_copy_constructible<T>::value && std::is_trivially_copy_assignable<T>::value && (llvm::is_trivially_move_constructible<T>::value || !std::is_move_constructible<T>::value) && (std::is_trivially_move_assignable<T>::value || !std::is_move_assignable<T>::value))>
char llvm::optional_detail::OptionalStorage< T, bool >::empty

Definition at line 62 of file Optional.h.

◆ val

template<typename T , bool = (llvm::is_trivially_copy_constructible<T>::value && std::is_trivially_copy_assignable<T>::value && (llvm::is_trivially_move_constructible<T>::value || !std::is_move_constructible<T>::value) && (std::is_trivially_move_assignable<T>::value || !std::is_move_assignable<T>::value))>
T llvm::optional_detail::OptionalStorage< T, bool >::val

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