Boost C++ Libraries: Ticket #12802: optional<recursive_wrapper> is broken in 1.63 https://svn.boost.org/trac10/ticket/12802 <pre class="wiki">boost::optional&lt;boost::recursive_wrapper&lt;int&gt; &gt; o; o = 1; </pre><p> gcc says error: no match for 'operator=' (operand types are 'boost::optional&lt;boost::recursive_wrapper&lt;int&gt; &gt;' and 'int') </p> <p> i found the reason for failure: is_convertible_to_T_or_factory checks is_constructinble&lt;T, U&amp;&amp;&gt;, which means &lt;recursive_wrapper&lt;U&gt;, U<strong>&amp;&amp;</strong>&gt;, while recursive wrapper specializes only &lt;recursive_wrapper&lt;T&gt;,T&gt; (no <strong>&amp;&amp;</strong>) as true and &lt;recursive_wrapper&lt;T&gt;,U&gt; (catches U=T<strong>&amp;&amp;</strong>) as false </p> <p> i don't know who is wrong - recursive_wrapper or optional it can be fixed either by adding </p> <pre class="wiki">template &lt;class T&gt; struct is_constructible &lt; recursive_wrapper &lt; T&gt;, T &amp;&amp;&gt; : boost::true_type{}; </pre><p> to recursive_wrapper or by changing boost::is_constructible&lt;T, U<strong>&amp;&amp;</strong>&gt; to boost::is_constructible&lt;T, U&gt; in is_convertible_to_T_or_factory </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12802 Trac 1.4.3