Opened 8 years ago

#11210 new Bugs

BOOST_CURRENT_FUNCTION internal compiler error

Reported by: ingo.loehken@… Owned by: No-Maintainer
Milestone: To Be Determined Component: utility
Version: Boost 1.57.0 Severity: Problem
Keywords: BOOST_CURRENT_FUNCTION, scoped enum, strong typed enum, internal compile error, vs2013 Cc:

Description

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)

Change History (0)

Note: See TracTickets for help on using tickets.