Boost logo

Boost Users :

From: Küppers, Ben (ben.kuppers_at_[hidden])
Date: 2006-11-30 06:02:47


craigp wrote:
> For some reason, I can't get the IDE to compile BOOST_MPL_ASSERT.

<snip>

> anyone else seen something like this before?? all the mpl regression tests
> compile fine via bjam (using msvc 7.1), so it appears ide-specific,
> somehow...

I am seeing the same behaviour. I also noticed that a release build seems to be immune to this problem. Also, the problem goes away as soon as the two character types are replaced by template classes and the character types are passed in later.

#include <boost/type_traits/is_same.hpp>
#include <boost/mpl/assert.hpp>

template< class T, class U > struct my
{
BOOST_MPL_ASSERT( ( boost::is_same< T, U > ) ); // ok
};
my<char,char> test;

template< class T, class U > void f()
{
// ...
BOOST_MPL_ASSERT( ( boost::is_same< T, U > ) ); // ok
BOOST_MPL_ASSERT( ( boost::is_same< char, char > ) ); // ok
};

int main()
{
   f< char, char >();
   BOOST_MPL_ASSERT( ( boost::is_same< char, char > ) ); // fail
}

-Ben

This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net