Boost logo

Boost :

From: Andy Little (andy_at_[hidden])
Date: 2005-06-22 14:13:10

"Alexander Nasonov" <alnsn-boost_at_[hidden]> wrote in message
> Andy Little <andy <at>> writes:
>> Isnt any use case for this covered by Boost.Typeof ?
> Quote from Boost.Typeof documentation:
> Other integral types, such as *enums*, need to be described explicitly with
> the

I think that applies when the type of the enum is taken, but where required
enums are promoted to some integer type,dependent on numeric value.
In what other situation is promotion required?

#include <boost/typeof/typeof.hpp>
#include <iostream>

struct X{
    enum id{x,y};

int main()
    BOOST_AUTO( result , X::x + X::y);
    std::cout << typeid(result).name() <<'\n';

Andy Little

Boost list run by bdawes at, gregod at, cpdaniel at, john at