Boost logo

Boost :

Subject: Re: [boost] [type traits] has_complement, enum class, and gcc 4.9
From: Frédéric Bron (frederic.bron_at_[hidden])
Date: 2014-04-21 02:26:13


> We are seeing build problems with gcc 4.9 RC1 and Boost 1.55. Given the
> following test program:
>
> #include <boost/type_traits.hpp>
> #include <iostream>
> enum class E {};
> int main()
> { std::cout << boost::has_complement<E>() << std::endl; }

does it compiles if:
- the enum class is not empty? Try to add a=0 for example (the
standard says: "If the enumerator-list is empty, the underlying type
is as if the enumeration had a single enumerator with value 0"
- you specify the underlying type with ": int", which is the normal
underlying type for empty enum class?

Frédéric


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk