Boost logo

Boost :

Subject: [boost] [optional] new version in master
From: Andrzej Krzemienski (akrzemi1_at_[hidden])
Date: 2014-05-16 08:50:08

Hi Everyone,
This might have been too hasty, but I have put a new version of
Boost.Optional on branch master. Tests in 'develop' and 'master' branches
pass fine, but I am not sure what it says about overall stability of the

The changes include:

   - Move semantics, interoperable with std::move_if_noexcept() -- i.e.,
   move operations are conditionally noexcept;
   - Using explicit operator bool() rather than custom 'safe-bool idiom'
   --on applicable platforms; this will break code that exploited the security
   hole in safe-bool idiom.
   - Now, you cannot bind optional<T const&> to a temporary (the
   constructor and assignment taking T&& is deleted);this also break some
   usages that are likely buggy, but there is a macro to put it back.
   - Comparison with boost::none does not require that T be
   EqualityComparable: we just forward the call to operator bool() od
   - optional<T&&> is explicitly prohibited.
   - some operations are marked noexcept (on platforms that support the
   - Rewritten some portions of documentation.

I encourage everyone with spare time and available resources to test the
version and give us feedback. Please remember that this is supposed to be
an incremental improvement over the previous version (for Boost 1.56.0),
and next upgrades are planned in the future.


Boost list run by bdawes at, gregod at, cpdaniel at, john at