LLVM  9.0.0svn
Public Member Functions | Public Attributes | List of all members
llvm::optional_detail::OptionalStorage< T, bool > Struct 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 ()=default
 
 OptionalStorage (const T &y)
 
 OptionalStorage (const OptionalStorage &O)
 
 OptionalStorage (T &&y)
 
 OptionalStorage (OptionalStorage &&O)
 
OptionalStorageoperator= (T &&y)
 
OptionalStorageoperator= (OptionalStorage &&O)
 
OptionalStorageoperator= (const T &y)
 
OptionalStorageoperator= (const OptionalStorage &O)
 
 ~OptionalStorage ()
 
void reset ()
 
TgetPointer ()
 
const TgetPointer () const
 

Public Attributes

AlignedCharArrayUnion< Tstorage
 
bool hasVal = false
 

Detailed Description

template<typename T, bool = is_trivially_copyable<T>::value>
struct llvm::optional_detail::OptionalStorage< T, bool >

Storage for any type.

Definition at line 33 of file Optional.h.

Constructor & Destructor Documentation

◆ OptionalStorage() [1/5]

template<typename T, bool = is_trivially_copyable<T>::value>
llvm::optional_detail::OptionalStorage< T, bool >::OptionalStorage ( )
default

◆ OptionalStorage() [2/5]

template<typename T, bool = is_trivially_copyable<T>::value>
llvm::optional_detail::OptionalStorage< T, bool >::OptionalStorage ( const T y)
inline

Definition at line 39 of file Optional.h.

◆ OptionalStorage() [3/5]

template<typename T, bool = is_trivially_copyable<T>::value>
llvm::optional_detail::OptionalStorage< T, bool >::OptionalStorage ( const OptionalStorage< T, bool > &  O)
inline

Definition at line 40 of file Optional.h.

◆ OptionalStorage() [4/5]

template<typename T, bool = is_trivially_copyable<T>::value>
llvm::optional_detail::OptionalStorage< T, bool >::OptionalStorage ( T &&  y)
inline

Definition at line 44 of file Optional.h.

◆ OptionalStorage() [5/5]

template<typename T, bool = is_trivially_copyable<T>::value>
llvm::optional_detail::OptionalStorage< T, bool >::OptionalStorage ( OptionalStorage< T, bool > &&  O)
inline

Definition at line 47 of file Optional.h.

◆ ~OptionalStorage()

template<typename T, bool = is_trivially_copyable<T>::value>
llvm::optional_detail::OptionalStorage< T, bool >::~OptionalStorage ( )
inline

Definition at line 93 of file Optional.h.

Member Function Documentation

◆ getPointer() [1/2]

template<typename T, bool = is_trivially_copyable<T>::value>
T* llvm::optional_detail::OptionalStorage< T, bool >::getPointer ( )
inline

◆ getPointer() [2/2]

template<typename T, bool = is_trivially_copyable<T>::value>
const T* llvm::optional_detail::OptionalStorage< T, bool >::getPointer ( ) const
inline

Definition at line 106 of file Optional.h.

◆ operator=() [1/4]

template<typename T, bool = is_trivially_copyable<T>::value>
OptionalStorage& llvm::optional_detail::OptionalStorage< T, bool >::operator= ( T &&  y)
inline

Definition at line 53 of file Optional.h.

Referenced by llvm::Optional< uint64_t >::operator=().

◆ operator=() [2/4]

template<typename T, bool = is_trivially_copyable<T>::value>
OptionalStorage& llvm::optional_detail::OptionalStorage< T, bool >::operator= ( OptionalStorage< T, bool > &&  O)
inline

Definition at line 62 of file Optional.h.

◆ operator=() [3/4]

template<typename T, bool = is_trivially_copyable<T>::value>
OptionalStorage& llvm::optional_detail::OptionalStorage< T, bool >::operator= ( const T y)
inline

Definition at line 76 of file Optional.h.

◆ operator=() [4/4]

template<typename T, bool = is_trivially_copyable<T>::value>
OptionalStorage& llvm::optional_detail::OptionalStorage< T, bool >::operator= ( const OptionalStorage< T, bool > &  O)
inline

Definition at line 85 of file Optional.h.

◆ reset()

template<typename T, bool = is_trivially_copyable<T>::value>
void llvm::optional_detail::OptionalStorage< T, bool >::reset ( )
inline

Member Data Documentation

◆ hasVal

template<typename T, bool = is_trivially_copyable<T>::value>
bool llvm::optional_detail::OptionalStorage< T, bool >::hasVal = false

◆ storage

template<typename T, bool = is_trivially_copyable<T>::value>
AlignedCharArrayUnion<T> llvm::optional_detail::OptionalStorage< T, bool >::storage

Definition at line 34 of file Optional.h.

Referenced by llvm::Optional< uint64_t >::getPointer().


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