id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 5615,BOOST_CHECK_EQUAL does not work well with const static members,anonymous,Gennadiy Rozental,"I have tried to create set of test cases using BOOST_AUTO_TEST_CASE_TEMPLATE() macro. Each tested class shares the same interface, but values returned from functions are different. Therefore I decided to use helper traits template to avoid code duplication. Each traits struct contains arguments and expected results for tested classes, stored as static const values - see example below. Unfortunately this code does not link successfully - linker complains about missing static struct members. Fortunately workaround is simple - just copy expected value to temporary variable and use it in BOOST_CHECK_EQUAL(). Please fix this to allow this code to compile and link successfully, without using workaround. {{{ class SomeClass { public: int test(int arg) { return arg + 1; } }; BOOST_AUTO_TEST_SUITE( Test_err ) template struct Tested_class_traits; template<> struct Tested_class_traits { static const int arg = 1; static const int result = 2; }; typedef boost::mpl::list< SomeClass > Tested_types; BOOST_AUTO_TEST_CASE_TEMPLATE( Test_err_test, TClass, Tested_types ) { typedef Tested_class_traits TestTraits; TClass obj; BOOST_CHECK_EQUAL( obj.test(TestTraits::arg), TestTraits::result ); } BOOST_AUTO_TEST_SUITE_END() }}}",Feature Requests,closed,To Be Determined,test,Boost 1.45.0,Problem,wontfix,,