Boost logo

Boost :

From: Brian Braatz (brianb_at_[hidden])
Date: 2005-11-01 16:28:17


// lifted from mpl reference manul
typedef mpl::vector<char,int,unsigned,long,unsigned long> s1;
typedef mpl::list<char,int,unsigned,long, unsigned long> s2;

// new list - nothing but floats
typedef mpl::list<float,float,float,float,float> s3;

void shouldnotwork()
{
    // this one is lifted RIGHT from the example in the MPL ref manual
    // compiles without error (as expected)
    BOOST_MPL_ASSERT(( mpl::equal< s1, s2 > ));

    // now use s3- which is VERY different from s1
    // this compiles without error on GCC4 (which is NOT expected)
    BOOST_MPL_ASSERT(( mpl::equal< s1, s3 > ));
}

Sorry I have not tested any other compilers


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