MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / optional_base

Class optional_base

extern/boost/boost/optional/optional.hpp:122–783  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120
121template<class T>
122class optional_base : public optional_tag
123{
124 private :
125
126 typedef aligned_storage<T> storage_type ;
127 typedef optional_base<T> this_type ;
128
129 protected :
130
131 typedef T value_type ;
132 typedef typename boost::remove_const<T>::type unqualified_value_type;
133
134 protected:
135 typedef T & reference_type ;
136 typedef T const& reference_const_type ;
137#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
138 typedef T && rval_reference_type ;
139 typedef T && reference_type_of_temporary_wrapper ;
140#endif
141 typedef T * pointer_type ;
142 typedef T const* pointer_const_type ;
143 typedef T const& argument_type ;
144
145 // Creates an optional<T> uninitialized.
146 // No-throw
147 optional_base()
148 :
149 m_initialized(false) {}
150
151 // Creates an optional<T> uninitialized.
152 // No-throw
153 optional_base ( none_t )
154 :
155 m_initialized(false) {}
156
157 // Creates an optional<T> initialized with 'val'.
158 // Can throw if T::T(T const&) does
159 optional_base ( init_value_tag, argument_type val )
160 :
161 m_initialized(false)
162 {
163 construct(val);
164 }
165
166#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
167 // move-construct an optional<T> initialized from an rvalue-ref to 'val'.
168 // Can throw if T::T(T&&) does
169 optional_base ( init_value_tag, rval_reference_type val )
170 :
171 m_initialized(false)
172 {
173 construct( boost::move(val) );
174 }
175#endif
176
177 // Creates an optional<T> initialized with 'val' IFF cond is true, otherwise creates an uninitialized optional<T>.
178 // Can throw if T::T(T const&) does
179 optional_base ( bool cond, argument_type val )

Callers

nothing calls this directly

Calls 3

assignMethod · 0.95
destroyFunction · 0.50
BOOST_WORKAROUNDFunction · 0.50

Tested by

no test coverage detected