Boost C++ Libraries: Ticket #12203: boost::optional<optional<T>&> broken in 1.61.0 https://svn.boost.org/trac10/ticket/12203 <p> With the new specialization for boost::optional&lt;T&amp;&gt;, there's one use case that's broken now...if T is itself an optional, things are broken. </p> <p> 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. </p> <p> Likely something like !boost::is_same&lt;optional&lt;T&amp;&gt;, typename boost::decay&lt;R&gt;::type&gt; would be a better condition...I'll try it out and update with further info. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12203 Trac 1.4.3 anonymous Fri, 13 May 2016 15:50:03 GMT <link>https://svn.boost.org/trac10/ticket/12203#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12203#comment:1</guid> <description> <p> For posterity, here's a reproducer: </p> <pre class="wiki">#include&lt;boost/optional.hpp&gt; int main() { boost::optional&lt;int&gt; x; boost::optional&lt;boost::optional&lt;int&gt;&amp;&gt; y(x); //compile error return 0; } </pre> </description> <category>Ticket</category> </item> <item> <author>benzejaa@…</author> <pubDate>Fri, 13 May 2016 16:01:48 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12203#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12203#comment:2</guid> <description> <p> Pull request of fix </p> <p> <a class="ext-link" href="https://github.com/boostorg/optional/pull/18"><span class="icon">​</span>https://github.com/boostorg/optional/pull/18</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Mon, 16 May 2016 17:59:02 GMT</pubDate> <title>component changed; owner set https://svn.boost.org/trac10/ticket/12203#comment:3 https://svn.boost.org/trac10/ticket/12203#comment:3 <ul> <li><strong>owner</strong> set to <span class="trac-author">Fernando Cacciola</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">optional</span> </li> </ul> Ticket benzejaa@… Wed, 18 May 2016 17:54:30 GMT <link>https://svn.boost.org/trac10/ticket/12203#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12203#comment:4</guid> <description> <p> Whoops, that patch has a minor typo...hold on, let me generate a fixed one </p> </description> <category>Ticket</category> </item> <item> <author>benzejaa@…</author> <pubDate>Wed, 18 May 2016 17:59:37 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12203#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12203#comment:5</guid> <description> <p> Okay same pull request, fixed typo (apparently github lets me just stealthy push --force behind the scenes and updates my pull request automatically...nice!) </p> </description> <category>Ticket</category> </item> <item> <dc:creator>akrzemi1</dc:creator> <pubDate>Tue, 08 Nov 2016 20:49:45 GMT</pubDate> <title>status, milestone changed; resolution set https://svn.boost.org/trac10/ticket/12203#comment:6 https://svn.boost.org/trac10/ticket/12203#comment:6 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.63.0</span> </li> </ul> Ticket