[Boost-bugs] [Boost C++ Libraries] #11203: boost::none compile errors with MSVC

Subject: [Boost-bugs] [Boost C++ Libraries] #11203: boost::none compile errors with MSVC
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-04-18 13:30:24


#11203: boost::none compile errors with MSVC
------------------------------+-----------------------
 Reporter: raad@… | Owner: fcacciola
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: optional
  Version: Boost 1.58.0 | Severity: Problem
 Keywords: |
------------------------------+-----------------------
 The new boost::none in 1.58 doesn't compile on MSVC when using precomiled
 headers.

 Code to reproduce the problem:

 precompiled header stdafx.h:
 {{{
 #include <boost/optional.hpp>
 }}}

 s.cpp:
 {{{
 #include "stdafx.h"

 struct s {
  void f(boost::optional<int> const& = boost::none) {}
 };
 }}}

 On MSVC12, this results in the error message:
 {{{
 s.cpp(3): error C3083: ' ?? A0x06d21c56': the symbol to the left of a '::'
 must be a type
 }}}

 Defining BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE works around the
 problem, but I haven't found it documented anywhere.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11203>
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:18 UTC