diff --git a/test/const_element_containers.cpp b/test/const_element_containers.cpp index 5bfca6a6..51fc94f7 100644 --- a/test/const_element_containers.cpp +++ b/test/const_element_containers.cpp @@ -12,49 +12,52 @@ #include #include -template< class T > -void test_instantiations() -{ - // force instantiation of all members - template class - boost::ptr_array; - - template class - boost::ptr_deque; - - template class - boost::ptr_list; - - template class - boost::ptr_map; - - template class - boost::ptr_vector; +// force instantiation of all members +#define TEST_INSTANTIATIONS(T) \ + template class \ + boost::ptr_array; \ + \ + template class \ + boost::ptr_deque; \ + \ + template class \ + boost::ptr_list; \ + \ + template class \ + boost::ptr_map; \ + \ + template class \ + boost::ptr_vector; \ //@todo problem with constructor forwarding //template class //boost::ptr_unordered_map; - + + +TEST_INSTANTIATIONS(const int) +TEST_INSTANTIATIONS(boost::nullable) + +template class +boost::ptr_set; + +// @todo: problem with constructor forwarding +//template class +//boost::ptr_unordered_set; + + +template< class T > +void test_instantiations() +{ // @todo: there seems to be some problems with // argument passing in circular_buffer //boost::ptr_circular_buffer buffer(32); - //buffer.push_back( new int(42) ); + //buffer.push_back( new int(42) ); } - - void test_const_element_container() -{ +{ test_instantiations(); test_instantiations< boost::nullable >(); - - template class - boost::ptr_set; - - // @todo: problem with constructor forwarding - //template class - //boost::ptr_unordered_set; - } @@ -70,8 +73,3 @@ test_suite* init_unit_test_suite( int argc, char* argv[] ) return test; } - - - - -