Boost logo

Boost :

From: Gennaro Prota (gennaro_prota_at_[hidden])
Date: 2003-04-16 12:23:39


--- Gennaro Prota <gennaro_prota_at_[hidden]> wrote:

> Thanks. I'll do it in the morning, after some quick tests.

Tests, yeah :-) I've just discovered that, for pointer-to-members non-type
arguments, Intel C++ 6.0 has about the same bug as VC++ 6. Here's a small
program to reproduce it:

// Compile with -Qoption,c,--strict,--no_microsoft
//
// The program shouldn't assert, but does it at
// the line with "<--"
//
struct X {
    int i;
    int j;
    X() : i(0), j(1) {}
};

int global = 0;

template <int X::* p>
void f() {

    X x;
    if (x.*p == 0) {
        assert(global == 0); <--
        global = 1;
    }
    else {
        assert(x.*p == 1);
        assert(global == 1);
    }
}

int main()
{
    f<&X::i>();
    f<&X::j>();

}

I've found no way to fix it.

Genny.

__________________________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo
http://search.yahoo.com


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