Boost logo

Boost :

From: Stephan Tolksdorf (andorxor_at_[hidden])
Date: 2006-08-26 08:00:13


Hi,

BOOST_CHECK_EQUAL is implemented in a way that checking static const
integral members yields "undefined reference" errors in GCC. For example

--
#define BOOST_TEST_MAIN
#include "boost/test/included/unit_test.hpp"
struct Test {
	static const int n = 1;
};
BOOST_AUTO_TEST_SUITE(TestSuite);
BOOST_AUTO_TEST_CASE(TestCase) {
	BOOST_CHECK_EQUAL(1,Test::n);	
}
BOOST_AUTO_TEST_SUITE_END();
--
doesn't link in GCC.
Is there an easy way to modify BOOST_CHECK_EQUAL in order to avoid this 
problem?  Thanks in advance for any hints.
Regards,
   Stephan

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