
13 Jan
2005
13 Jan
'05
5:26 p.m.
"Jody Hagins" <jody-boost-011304@atdesk.com> wrote in message news:20050113121604.1f0f6ed0.jody-boost-011304@atdesk.com...
Consider this simple example...
#include <boost/test/test_tools.hpp>
struct Foo { static unsigned int const x = 10; };
int test_main( int, char* [] ) // note the name! { BOOST_CHECK_EQUAL(10U, Foo::x); return 0; }
At least under gcc, I get a linker error, unable to find Foo::x, while the following code works fine...
int test_main( int, char* [] ) // note the name! { BOOST_CHECK(10U == Foo::x); return 0; }
I remember very similar issue with MPL constants. I consider this a compiler bug and it could (and should) be workaround on struct Foo implementation level (did you try to use enum?) Gennadiy