Boost C++ Libraries: Ticket #11088: Converting assignment operator is too generous https://svn.boost.org/trac10/ticket/11088 <p> This has been reported by Karol Nowacki. The following program compiles although it shoudl not. </p> <pre class="wiki">#include &lt;boost/optional.hpp&gt; enum E1 {e1}; enum E2 {e2}; int main() { boost::optional&lt;E2&gt; o2(e2); boost::optional&lt;E1&gt; o1; o1 = o2; // SHOULD NOT WORK } </pre><p> It should not compile given that the following do not compile: </p> <pre class="wiki">E1 v1 = e2; // FAILS E1 v1_; v1_ = e2; // FAILS </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11088 Trac 1.4.3 akrzemi1 Mon, 23 Mar 2015 20:34:28 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/11088#comment:1 https://svn.boost.org/trac10/ticket/11088#comment:1 <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">duplicate</span> </li> </ul> Ticket akrzemi1 Mon, 23 Mar 2015 20:34:59 GMT <link>https://svn.boost.org/trac10/ticket/11088#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11088#comment:2</guid> <description> <p> Duplicate of <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/11087" title="#11087: Bugs: Converting assignment operator is too generous (closed: fixed)">#11087</a> </p> </description> <category>Ticket</category> </item> </channel> </rss>