Boost logo

Boost :

From: Mark Rodgers (mark.rodgers_at_[hidden])
Date: 2000-11-22 03:42:23


I don't know if this helps you at all, but I did manage to get your
challenge to compile by changing this line

#define value_test(v, x) checker<(v == x)>::check(v, x, #x);

to this

#define value_test(v, x) \
   enum { BOOST_JOIN(foo, __LINE__) = x }; \
   checker<(v == x)>::check(v, x, #x);
#define BOOST_JOIN( X, Y ) BOOST_DO_JOIN( X, Y )
#define BOOST_DO_JOIN( X, Y ) X##Y

It seems that the usage of is_convertible::value as the value for
an enum forces the compiler to treat it as a compile time constant
henceforth. Weird!

I don't know if we can do anything about it other than provide
documentation to this effect so that users can use this workaround.


Boost list run by bdawes at, gregod at, cpdaniel at, john at