25 #ifndef __XRD_CL_OPTIONAL_HH__
26 #define __XRD_CL_OPTIONAL_HH__
52 new( &memory.value ) T( t );
68 if( !optional )
new( &memory.value ) T( opt.memory.value );
76 if( !optional )
new( &memory.value ) T( std::move( opt.memory.value ) );
84 if( optional ) memory.value.~T();
94 optional = opt.optional;
95 if( !optional ) memory.value = opt.memory.value;
107 optional = opt.optional;
108 if( !optional ) memory.value = std::move( opt.memory.value );
116 operator bool()
const
162 inline ~Storage(){ };
Optional(const T &t)
Constructor for value.
Optional(const None &n=none)
Default constructor.
Optional(Optional &&opt)
Move constructor.
const T & operator*() const
Dereference operator.
Optional & operator=(const Optional &opt)
Copy assignment operator.
T & operator*()
Dereference operator.
Optional(const Optional &opt)
Copy constructor.
Optional & operator=(Optional &&opt)
Move assignment operator.
static struct XrdCl::None none
none object for initializing empty Optional