Boost logo

Boost :

From: Howard Hinnant (hinnant_at_[hidden])
Date: 2001-03-17 13:51:12


Oh, wait a minute. NotAnEnum won't classify as is_enum because it
involves 2 user-defined implicit conversions, right?

Very clever!

-Howard

Howard Hinnant wrote on 3/17/01 1:33 PM
>Just browsing composite_traits.hpp and is_enum. My compiler (Metrowerks)
>doesn't support is_convertible (at least I don't think it will, haven't
>actually tried). But I was wondering if the following class might
>mistakenly be classified as an enum?
>
>struct NotAnEnum
>{
> operator int() const {return 0;}
>};


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