9595 namespace boost {
9696
9797 class in_place_init_t { /* see below */ } ;
98- const in_place_init_t in_place_init ( /* see below */ ) ;
98+ inline constexpr in_place_init_t in_place_init ( /* see below */ ) ;
9999
100100 class in_place_init_if_t { /*see below*/ } ;
101- const in_place_init_if_t in_place_init_if ( /*see below*/ ) ;
101+ inline constexpr in_place_init_if_t in_place_init_if ( /*see below*/ ) ;
102102
103103 }
104104
@@ -123,33 +123,33 @@ They are empty, trivially copyable classes with disabled default constructor.
123123 typedef T * pointer_type ;
124124 typedef T const* pointer_const_type ;
125125
126- optional () noexcept ; ``[link reference_optional_constructor __GO_TO__]``
126+ constexpr optional () noexcept ; ``[link reference_optional_constructor __GO_TO__]``
127127
128- optional ( none_t ) noexcept ; ``[link reference_optional_constructor_none_t __GO_TO__]``
128+ constexpr optional ( none_t ) noexcept ; ``[link reference_optional_constructor_none_t __GO_TO__]``
129129
130- optional ( T const& v ) ; ``[link reference_optional_constructor_value __GO_TO__]``
130+ constexpr optional ( T const& v ) ; ``[link reference_optional_constructor_value __GO_TO__]``
131131
132- optional ( T&& v ) ; ``[link reference_optional_constructor_move_value __GO_TO__]``
132+ constexpr optional ( T&& v ) ; ``[link reference_optional_constructor_move_value __GO_TO__]``
133133
134- optional ( bool condition, T const& v ) ; ``[link reference_optional_constructor_bool_value __GO_TO__]``
134+ constexpr optional ( bool condition, T const& v ) ; ``[link reference_optional_constructor_bool_value __GO_TO__]``
135135
136- optional ( optional const& rhs ) ; ``[link reference_optional_constructor_optional __GO_TO__]``
136+ constexpr optional ( optional const& rhs ) ; ``[link reference_optional_constructor_optional __GO_TO__]``
137137
138- optional ( optional&& rhs ) noexcept(``['see below]``) ; ``[link reference_optional_move_constructor_optional __GO_TO__]``
138+ constexpr optional ( optional&& rhs ) noexcept(``['see below]``) ; ``[link reference_optional_move_constructor_optional __GO_TO__]``
139139
140- template<class U> explicit optional ( optional<U> const& rhs ) ; ``[link reference_optional_constructor_other_optional __GO_TO__]``
140+ template<class U> constexpr explicit optional ( optional<U> const& rhs ) ; ``[link reference_optional_constructor_other_optional __GO_TO__]``
141141
142- template<class U> explicit optional ( optional<U>&& rhs ) ; ``[link reference_optional_move_constructor_other_optional __GO_TO__]``
142+ template<class U> constexpr explicit optional ( optional<U>&& rhs ) ; ``[link reference_optional_move_constructor_other_optional __GO_TO__]``
143143
144- template<class... Args> explicit optional ( in_place_init_t, Args&&... args ) ; ``[link reference_optional_in_place_init __GO_TO__]``
144+ template<class... Args> constexpr explicit optional ( in_place_init_t, Args&&... args ) ; ``[link reference_optional_in_place_init __GO_TO__]``
145145
146- template<class... Args> explicit optional ( in_place_init_if_t, bool condition, Args&&... args ) ; ``[link reference_optional_in_place_init_if __GO_TO__]``
146+ template<class... Args> constexpr explicit optional ( in_place_init_if_t, bool condition, Args&&... args ) ; ``[link reference_optional_in_place_init_if __GO_TO__]``
147147
148148 template<class InPlaceFactory> explicit optional ( InPlaceFactory const& f ) ; ``[link reference_optional_constructor_factory __GO_TO__]``
149149
150150 template<class TypedInPlaceFactory> explicit optional ( TypedInPlaceFactory const& f ) ; ``[link reference_optional_constructor_factory __GO_TO__]``
151151
152- optional& operator = ( none_t ) noexcept ; ``[link reference_optional_operator_equal_none_t __GO_TO__]``
152+ constexpr optional& operator = ( none_t ) noexcept ; ``[link reference_optional_operator_equal_none_t __GO_TO__]``
153153
154154 optional& operator = ( T const& v ) ; ``[link reference_optional_operator_equal_value __GO_TO__]``
155155
@@ -169,52 +169,50 @@ They are empty, trivially copyable classes with disabled default constructor.
169169
170170 template<class TypedInPlaceFactory> optional& operator = ( TypedInPlaceFactory const& f ) ; ``[link reference_optional_operator_equal_factory __GO_TO__]``
171171
172- T const& get() const ; ``[link reference_optional_get __GO_TO__]``
173- T& get() ; ``[link reference_optional_get __GO_TO__]``
172+ constexpr T const& get() const ; ``[link reference_optional_get __GO_TO__]``
173+ constexpr T& get() ; ``[link reference_optional_get __GO_TO__]``
174174
175- T const* operator ->() const ; ``[link reference_optional_operator_arrow __GO_TO__]``
176- T* operator ->() ; ``[link reference_optional_operator_arrow __GO_TO__]``
175+ constexpr T const* operator ->() const ; ``[link reference_optional_operator_arrow __GO_TO__]``
176+ constexpr T* operator ->() ; ``[link reference_optional_operator_arrow __GO_TO__]``
177177
178- T const& operator *() const& ; ``[link reference_optional_operator_asterisk __GO_TO__]``
179- T& operator *() & ; ``[link reference_optional_operator_asterisk __GO_TO__]``
180- T&& operator *() && ; ``[link reference_optional_operator_asterisk_move __GO_TO__]``
178+ constexpr T const& operator *() const& ; ``[link reference_optional_operator_asterisk __GO_TO__]``
179+ constexpr T& operator *() & ; ``[link reference_optional_operator_asterisk __GO_TO__]``
180+ constexpr T&& operator *() && ; ``[link reference_optional_operator_asterisk_move __GO_TO__]``
181181
182- T const& value() const& ; ``[link reference_optional_value __GO_TO__]``
183- T& value() & ; ``[link reference_optional_value __GO_TO__]``
184- T&& value() && ; ``[link reference_optional_value_move __GO_TO__]``
182+ constexpr T const& value() const& ; ``[link reference_optional_value __GO_TO__]``
183+ constexpr T& value() & ; ``[link reference_optional_value __GO_TO__]``
184+ constexpr T&& value() && ; ``[link reference_optional_value_move __GO_TO__]``
185185
186- template<class U> T value_or( U && v ) const& ; ``[link reference_optional_value_or __GO_TO__]``
187- template<class U> T value_or( U && v ) && ; ``[link reference_optional_value_or_move __GO_TO__]``
186+ template<class U> constexpr T value_or( U && v ) const& ; ``[link reference_optional_value_or __GO_TO__]``
187+ template<class U> constexpr T value_or( U && v ) && ; ``[link reference_optional_value_or_move __GO_TO__]``
188188
189- template<class F> T value_or_eval( F f ) const& ; ``[link reference_optional_value_or_call __GO_TO__]``
190- template<class F> T value_or_eval( F f ) && ; ``[link reference_optional_value_or_call_move __GO_TO__]``
189+ template<class F> constexpr T value_or_eval( F f ) const& ; ``[link reference_optional_value_or_call __GO_TO__]``
190+ template<class F> constexpr T value_or_eval( F f ) && ; ``[link reference_optional_value_or_call_move __GO_TO__]``
191191
192- template<class F> auto map( F f ) const& -> ``['see below]``; ``[link reference_optional_map __GO_TO__]``
193- template<class F> auto map( F f ) & -> ``['see below]``; ``[link reference_optional_map __GO_TO__]``
194- template<class F> auto map( F f ) && -> ``['see below]``; ``[link reference_optional_map_move __GO_TO__]``
192+ template<class F> constexpr auto map( F f ) const& -> ``['see below]``; ``[link reference_optional_map __GO_TO__]``
193+ template<class F> constexpr auto map( F f ) & -> ``['see below]``; ``[link reference_optional_map __GO_TO__]``
194+ template<class F> constexpr auto map( F f ) && -> ``['see below]``; ``[link reference_optional_map_move __GO_TO__]``
195195
196- template<class F> auto flat_map( F f ) const& -> ``['see below]``; ``[link reference_optional_flat_map __GO_TO__]``
197- template<class F> auto flat_map( F f ) & -> ``['see below]``; ``[link reference_optional_flat_map __GO_TO__]``
198- template<class F> auto flat_map( F f ) && -> ``['see below]``; ``[link reference_optional_flat_map_move __GO_TO__]``
196+ template<class F> constexpr auto flat_map( F f ) const& -> ``['see below]``; ``[link reference_optional_flat_map __GO_TO__]``
197+ template<class F> constexpr auto flat_map( F f ) & -> ``['see below]``; ``[link reference_optional_flat_map __GO_TO__]``
198+ template<class F> constexpr auto flat_map( F f ) && -> ``['see below]``; ``[link reference_optional_flat_map_move __GO_TO__]``
199199
200200 T const* get_ptr() const ; ``[link reference_optional_get_ptr __GO_TO__]``
201201 T* get_ptr() ; ``[link reference_optional_get_ptr __GO_TO__]``
202202
203- bool has_value() const noexcept ; ``[link reference_optional_operator_bool __GO_TO__]``
204-
205- explicit operator bool() const noexcept ; ``[link reference_optional_operator_bool __GO_TO__]``
203+ constexpr bool has_value() const noexcept ; ``[link reference_optional_operator_bool __GO_TO__]``
206204
207- bool operator! () const noexcept ; ``[link reference_optional_operator_not __GO_TO__]``
205+ constexpr explicit operator bool () const noexcept ; ``[link reference_optional_operator_bool __GO_TO__]``
208206
209- void reset() noexcept ; ``[link reference_optional_reset __GO_TO__]``
207+ constexpr void reset() noexcept ; ``[link reference_optional_reset __GO_TO__]``
210208
211209 // deprecated methods
212210
213211 // (deprecated)
214212 void reset ( T const& ) ; ``[link reference_optional_reset_value __GO_TO__]``
215213
216214 // (deprecated)
217- bool is_initialized() const ; ``[link reference_optional_is_initialized __GO_TO__]``
215+ constexpr bool is_initialized() const ; ``[link reference_optional_is_initialized __GO_TO__]``
218216
219217 // (deprecated)
220218 T const& get_value_or( T const& default ) const ; ``[link reference_optional_get_value_or_value __GO_TO__]``
@@ -239,9 +237,9 @@ They are empty, trivially copyable classes with disabled default constructor.
239237 typedef T* pointer_type;
240238 typedef T* pointer_const_type; // no const propagation
241239
242- optional () noexcept ; ``[link reference_optional_ref_default_ctor __GO_TO__]``
240+ constexpr optional () noexcept ; ``[link reference_optional_ref_default_ctor __GO_TO__]``
243241
244- optional ( none_t ) noexcept ; ``[link reference_optional_ref_default_ctor __GO_TO__]``
242+ constexpr optional ( none_t ) noexcept ; ``[link reference_optional_ref_default_ctor __GO_TO__]``
245243
246244 template<class R> optional(R&& r) noexcept ; ``[link reference_optional_ref_value_ctor __GO_TO__]``
247245
0 commit comments