Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#6394 closed Bugs (worksforme)

Strongly typed enum not recognized by boost::is_enum

Reported by: tommitissari@… Owned by: John Maddock
Milestone: To Be Determined Component: type_traits
Version: Boost 1.48.0 Severity: Problem
Keywords: Cc:

Description

Using Intel c++ compiler XE 12.1 the new c++11 strongly typed enum type isn't recognized by boost::is_enum. It is recognized by std::is_enum though:

#include <iostream>
#include <type_traits>
#include <boost/type_traits.hpp>
//...
enum class StrongEnum { first, second };
std::cout << boost::is_enum<StrongEnum>::value << std::endl;
std::cout << std::is_enum<StrongEnum>::value << std::endl;

The output is:
0
1

Notice that the same bug is probably the reason why boost serialization for strongly typed enum's doesn't work either.

Change History (2)

comment:1 by John Maddock, 10 years ago

Resolution: worksforme
Status: newclosed

With apologies for the delay, this works for me both on Linux and Win32 with the latest 12.1 compiler releases and Boost.Trunk. I don't see any relevant changes between Boost-1.48 and now either. Please reopen if it's still an issue, and please give platform details.

comment:2 by John Maddock, 10 years ago

(In [79562]) Merged accumulated bug fixes from Trunk. Refs #6795. Refs #6394.

Note: See TracTickets for help on using tickets.