MCPcopy Create free account
hub / github.com/ablab/spades / optional_base

Class optional_base

ext/include/boost/optional/optional.hpp:123–784  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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