#6394 closed Bugs (worksforme)
Strongly typed enum not recognized by boost::is_enum
Reported by: | 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 , 10 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
comment:2 by , 10 years ago
Note:
See TracTickets
for help on using tickets.
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.