Boost C++ Libraries: Ticket #11203: boost::none compile errors with MSVC https://svn.boost.org/trac10/ticket/11203 <p> The new boost::none in 1.58 doesn't compile on MSVC when using precomiled headers. </p> <p> Code to reproduce the problem: </p> <p> precompiled header stdafx.h: </p> <pre class="wiki">#include &lt;boost/optional.hpp&gt; </pre><p> s.cpp: </p> <pre class="wiki">#include "stdafx.h" struct s { void f(boost::optional&lt;int&gt; const&amp; = boost::none) {} }; </pre><p> On MSVC12, this results in the error message: </p> <pre class="wiki">s.cpp(3): error C3083: ' ?? A0x06d21c56': the symbol to the left of a '::' must be a type </pre><p> Defining BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE works around the problem, but I haven't found it documented anywhere. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11203 Trac 1.4.3 akrzemi1 Tue, 20 Oct 2015 21:28:06 GMT owner changed https://svn.boost.org/trac10/ticket/11203#comment:1 https://svn.boost.org/trac10/ticket/11203#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Fernando Cacciola</span> to <span class="trac-author">akrzemi1</span> </li> </ul> Ticket akrzemi1 Tue, 20 Oct 2015 21:28:25 GMT status, milestone changed; resolution set https://svn.boost.org/trac10/ticket/11203#comment:2 https://svn.boost.org/trac10/ticket/11203#comment:2 <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.60.0</span> </li> </ul> Ticket