[Boost-bugs] [Boost C++ Libraries] #11210: BOOST_CURRENT_FUNCTION internal compiler error

Subject: [Boost-bugs] [Boost C++ Libraries] #11210: BOOST_CURRENT_FUNCTION internal compiler error
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-04-20 18:55:59


#11210: BOOST_CURRENT_FUNCTION internal compiler error
-------------------------------------------------+-------------------------
 Reporter: ingo.loehken@… | Owner: no-
     Type: Bugs | maintainer
Milestone: To Be Determined | Status: new
  Version: Boost 1.57.0 | Component: utility
 Keywords: BOOST_CURRENT_FUNCTION, scoped | Severity: Problem
  enum, strong typed enum, internal compile |
  error, vs2013 |
-------------------------------------------------+-------------------------
 Hi,

 if using a template function with an parameter that needs to be specified
 explicitly and is either a pseudo scoped enum or scoped enum with a
 specific storage type, compilation on vs2013 will fail with and internal
 compiler error. This can easily be fixed using FUNCTION (XXX) for that
 compiler-version.

 (XXX) 2 leading and trailing underscores missing at FUNCTION

 Greetz, ILo.

 How to reproduce:

 struct Val
 {
   enum Enum : unsigned char
   {
      x,
   };
 };

 typedef ScopeEnum::Vals

 template <Vals eVal> void Foo()
 {
   BOOST_ASSERT(eVal == Val::x);
 }

 How to solve: (add to line 31 in front of all ifdef, current_function.hpp)

 #if defined(_MSC_VER) && (_MSC_VER > 1700) // > vs2012 (only tested for
 vs2013)

 # define BOOST_CURRENT_FUNCTION FUNCTION (XXX)

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