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 hasValue () const noexcept
 
TgetValue () &noexcept
 
constexpr const TgetValue () const &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 109 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 104 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 96 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 100 of file Optional.h.

◆ 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

◆ 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 148 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 134 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 124 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 115 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

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.

◆ 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))>
T llvm::optional_detail::OptionalStorage< T, bool >::value

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