Gennaro Prota <[EMAIL PROTECTED]> writes:

> I was running some tests on the max_of, min_of etc. templates I've
> proposed some days ago and, *as expected*, VC++ gave problems with
> integral conversions of enumerators. As I think you all know, if you
> have something like
>
>     enum e { e1 = 1u << 31 };
>
> then it simply "promotes" e1 to int instead of unsigned int. For
> instance this
>
>     enum e { e1 = 2147483648u };
>
>     #include <iostream>
>
>     int main() {
>         std::cout << e1 << '\n';
>     }
>
> outputs -2147483648. Applied to my code, where I have e.g.

Are you sure the promotion doesn't happen when e1 is passed to the
streaming operator?

-- 
                       David Abrahams
   [EMAIL PROTECTED] * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to