id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 11625,"BOOST_TEST( ..., per_element() ) erroneously requires collections are comparable",Tony Lewis ,Raffi Enficiaud,"Thanks for the new BOOST_TEST() and per_element() tools, which look very useful. Unfortunately, I'm having trouble with comparing collections that aren't themselves comparable but have comparable elements. As I understand [http://www.boost.org/libs/test/doc/html/boost_test/testing_tools/extended_comparison/collections.html#boost_test.testing_tools.extended_comparison.collections.requirements the requirements documentation] for the BOOST_TEST / per_element() tools, they should only require that the two collections' ''elements'' are comparable, not necessarily the two collections themselves. I think this approach makes a lot of sense. However, when I try to compile the following under either `g++ -std=c++11` or `clang -std=c++11 -stdlib=libc++`, the compilers complain that collections aren't comparable : {{{#!cpp #define BOOST_TEST_MODULE comp_by_elem_mod #include #include #include struct my_class final { std::vector the_ints = { 1, 2, 3 }; using const_iterator = std::vector::const_iterator; const_iterator begin() const { return std::begin( the_ints ); } const_iterator end() const { return std::end( the_ints ); } }; BOOST_AUTO_TEST_CASE( comp_by_elem ) { const my_class a{}; const std::vector b = { 1, 2, 3 }; BOOST_TEST( a == b, ::boost::test_tools::per_element() ); } }}} I'll attach compiler errors. Many thanks.",Bugs,closed,To Be Determined,test,Boost 1.60.0,Problem,invalid,"BOOST_TEST,per_element,collections,comparable,element,range,equality",