-
boost::none_t is no longer convertible from
literal 0. This avoids a bug
where optional<rational<int>> oi = 0; would
initialize an optional object with no contained value.
-
Git pull #9:
"Supply
<string>
to fix C++03 compile error on logic_error("...")".
-
Added support for rvalue references. Now
optional<T> works with moveable but non-copyable
T's,
-
Improved
swap (now uses
move operations),
-
Added function
emplace(). This is the last of the requests from
Trac #1841,
-
optional is moveable, including
conditional noexcept specifications,
which make it move_if_noexcept-friendly,
-
Using explicit operator bool() on platforms that support it (Trac
#4227) (breaking change),
-
Forward declaration of
operator<<(ostream&, optional
const&)
to prevent inadvertent incorrect serialization of optional objects,
-
Removed deprecated function
reset() from examples (Trac
#9005),
-
Equality comparison with
boost::none
does not require that T
be EqualityComparable,
-
Optional rvalue references are explicitly disallowed,
-
Binding temporaries to optional references is explicitly disallowed (breaking
change),
-
More ways to access the contained value, functions
value(), value_or(), value_or_eval(),
-
Updated and reorganized documentation, added tutorial and quick guide sections.