From 59266a26301e6add265601841687b44306ba8c82 Mon Sep 17 00:00:00 2001
From: Andrzej Krzemienski
Effects:
- CopyConstructible
and CopyAssignable
.
-
!*this
- && !rhs
no effect, otherwise
- bool(*this)
- && !rhs
, destroys the contained value
- by calling val->T::~T()
, otherwise
- !*this
- && bool(rhs)
, initializes the contained value
- as if direct-initializing an object of type T
- with *rhs
,
- otherwise
- bool(*this)
- && bool(rhs)
) assigns *rhs
to the contained value.
-
+ | +
+
+ |
+
+
+ |
+
---|---|---|
+
+ |
+
+
+ assigns |
+
+
+ initializes the contained value as if direct-initializing an
+ object of type |
+
+
+ |
+
+
+ destroys the contained value by calling |
+
+ + no effect + + |
+
*this
;
MoveAssignable
.
Effects: -
!*this
- && !rhs
no effect, otherwise
- bool(*this)
- && !rhs
, destroys the contained value
- by calling val->T::~T()
, otherwise
- !*this
- && bool(rhs)
, initializes the contained value
- as if direct-initializing an object of type T
- with std::move(*rhs)
,
- otherwise
- bool(*this)
- && bool(rhs)
) assigns std::move(*rhs)
to the contained value.
- + | +
+
+ |
+
+
+ |
+
---|---|---|
+
+ |
+
+
+ assigns |
+
+
+ initializes the contained value as if direct-initializing an
+ object of type |
+
+
+ |
+
+
+ destroys the contained value by calling |
+
+ + no effect + + |
+
*this
;
+ Effect: +
++ | +
+
+ |
+
+
+ |
+
---|---|---|
+
+ |
+
+
+ assigns |
+
+
+ initializes the contained value as if direct-initializing an
+ object of type |
+
+
+ |
+
+
+ destroys the contained value by calling |
+
+ + no effect + + |
+
*this
.
rhs
- is initialized, *this
- is initialized and its value is a copy of the value
- of rhs
converted
- to type T
; else *this
- is uninitialized.
+ Postconditions: bool(rhs) == bool(*this)
.
T::operator=( U const& )
or T::T( U const& )
throws.
- *this
and rhs are initially initialized,
- T
's assignment
- operator (from U
)
- is used. If *this
- is initially initialized but rhs
- is uninitialized, T
's
- destructor is called. If *this
is initially uninitialized but rhs
- is initialized, T
's
- converting constructor (from U
)
- is called.
- *this
is unchanged and its value unspecified
- as far as optional is concerned (it is up to T
's
- operator=()
).
- If *this
- is initially uninitialized and T
's
- converting constructor fails, *this
is left properly uninitialized.
+ Exception Safety: If any exception is
+ thrown, the result of the expression bool(*this)
remains unchanged. If an exception is
+ thrown during the call to T
's
+ constructor, no effect. If an exception is thrown during the call to
+ T
's assignment, the state
+ of its contained value is as defined by the exception safety guarantee
+ of T
's copy assignment.
+ Effect: +
++ | +
+
+ |
+
+
+ |
+
---|---|---|
+
+ |
+
+
+ assigns |
+
+
+ initializes the contained value as if direct-initializing an
+ object of type |
+
+
+ |
+
+
+ destroys the contained value by calling |
+
+ + no effect + + |
+
*this
.
rhs
- is initialized, *this
- is initialized and its value is moved from the value of rhs
; else *this
is uninitialized.
+ Postconditions: bool(rhs) == bool(*this)
.
T::operator=( U&& )
- or T::T( U&&
- )
throws.
- *this
and rhs
- are initially initialized, T
's
- assignment operator (from U&&
) is used. If *this
- is initially initialized but rhs
- is uninitialized, T
's
- destructor is called. If *this
is initially uninitialized but rhs
is initialized, T
's
- converting constructor (from U&&
) is called.
- *this
is unchanged and its value unspecified
- as far as optional is concerned (it is up to T
's
- operator=()
).
- If *this
- is initially uninitialized and T
's
- converting constructor fails, *this
is left properly uninitialized.
+ Exception Safety: If any exception is
+ thrown, the result of the expression bool(*this)
remains unchanged. If an exception is
+ thrown during the call to T
's
+ constructor, no effect. If an exception is thrown during the call to
+ T
's assignment, the state
+ of its contained value is as defined by the exception safety guarantee
+ of T
's copy assignment.
T
shall be swappable and T
shall be MoveConstructible
.
Effects: -
!*this
- && !rhs
, no effect, otherwise
- bool(*this)
- && !rhs
, initializes the contained
- value of rhs
as
- if direct-initializing an object of type T
- with the expression std::move(*(*this))
, followed by val->T::~T()
, *this
does not contain a value and
- rhs
contains a
- value, otherwise
- !*this
- && bool(rhs)
, initializes the contained value
- of *this
- as if direct-initializing an object of type T
- with the expression std::move(*rhs)
, followed by rhs.val->T::~T()
, *this
contains a value and rhs
does not contain a value,
- otherwise
- bool(*this)
- && bool(rhs)
) calls swap(*(*this), *rhs)
.
- + | +
+
+ |
+
+
+ |
+
---|---|---|
+
+ |
+
+
+ calls |
+
+
+ initializes the contained value of |
+
+
+ |
+
+
+ initializes the contained value of |
+
+ + no effect + + |
+
x
and y
interchanged.
diff --git a/doc/html/boost_optional/relnotes.html b/doc/html/boost_optional/relnotes.html
index 02fcd41..1d476e3 100644
--- a/doc/html/boost_optional/relnotes.html
+++ b/doc/html/boost_optional/relnotes.html
@@ -52,6 +52,10 @@
This can be used to work around Trac
#10399
optional<U>
to optional<T>
when U
+ is not assignable or convertible to T
.
+ Last revised: January 21, 2015 at 13:59:23 GMT |
+Last revised: March 06, 2015 at 18:13:34 GMT |