[Boost-bugs] [Boost C++ Libraries] #12203: boost::optional<optional<T>&> broken in 1.61.0

Subject: [Boost-bugs] [Boost C++ Libraries] #12203: boost::optional<optional<T>&> broken in 1.61.0
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-05-13 15:35:11


#12203: boost::optional<optional<T>&> broken in 1.61.0
------------------------+------------------------------
 Reporter: benzejaa@… | Type: Bugs
   Status: new | Milestone: To Be Determined
Component: None | Version: Boost 1.61.0
 Severity: Problem | Keywords:
------------------------+------------------------------
 With the new specialization for boost::optional<T&>, there's one use case
 that's broken now...if T is itself an optional, things are broken.

 Diving into optional/detail/optional_reference_spec.hpp it looks like
 there's some boost::enable_if statements disabling this functionality.
 Presumably these statements are to differentiate from the copy
 constructors/assignment above (although I'm not sure why some of the other
 statements are similarly guarded). However "is_no_optional" is too broad
 of a guard.

 Likely something like !boost::is_same<optional<T&>, typename
 boost::decay<R>::type> would be a better condition...I'll try it out and
 update with further info.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12203>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:20 UTC