Boost logo

Boost :

From: Chris Trengove (trengove_at_[hidden])
Date: 2003-08-26 19:00:45


"John Maddock" <boost.regex_at_[hidden]> wrote in message
news:005101c36bc0$31e57500$29cb6b51_at_fuji...
> I can reproduce this with just:
>
> #include <vcl.h>
> #include <locale>
>
> No boost code necessary :-(
>
> Even worse this reproduces the error as well:
>
> #include <vcl.h>
> #pragma hdrstop
>
> enum enum_t
> {
> one = 1,
> two = 2
> };
>
> int test()
> {
> int a = one | two; // error
> int b = one + two; // error
> int c = (int)one & (int)two; // OK
> return a & b; // OK
> }
>
> which doesn't look good at all...
>
> Oh and the problem is present in Builder 6 as well.

No, it doesn't look good at all, but when I try the above two tests, the
compiler behaves for me (both Builder 5 and 6). I can even have

enum enum_t {
    one = 1,
    two = 2,
    three = one | two
};

and I don't get an error. Are you using any particular compiler setting?. (I
am just creating a new Console Project in the IDE and then pasting in the
code.) Maybe there is more to this?

Chris


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