Add assignment operators taking an InPlaceFactory to the Detailed Semantics section. Fixes #5378.

[SVN r71048]
This commit is contained in:
Andrzej Krzemienski
2014-04-11 11:06:35 +02:00
parent c52654fa52
commit 339a3c4ab8

View File

@ -500,6 +500,23 @@ assert ( *opt1 == static_cast<U>(v) ) ;
__SPACE__
[#reference_optional_operator_equal_factory]
[: `template<InPlaceFactory> optional<T>& optional<T` ['(not a ref)]`>::operator=( InPlaceFactory const& f );`]
[: `template<TypedInPlaceFactory> optional<T>& optional<T` ['(not a ref)]`>::operator=( TypedInPlaceFactory const& f );`]
* [*Effect:] Assigns an `optional` with a value of `T` obtained from the
factory.
* [*Postconditions: ] `*this` is [_initialized] and its value is ['directly given]
from the factory `f` (i.e., the value [_is not copied]).
* [*Throws:] Whatever the `T` constructor called by the factory throws.
* [*Notes:] See [link boost_optional.in_place_factories In-Place Factories]
* [*Exception Safety:] Exceptions can only be thrown during the call to
the `T` constructor used by the factory; in that case, the `optional` object
will be left empty.
__SPACE__
[#reference_optional_reset_value]
[: `void optional<T` ['(not a ref)]`>::reset( T const& v ) ;`]