id summary reporter owner description type status milestone component version severity resolution keywords cc 12876 BOOST_CHECK_EQUAL fail for vector with operator<< for vector 401819174@… Gennadiy Rozental "#include #include #include #include using namespace std; class PrintClass { }; bool operator== (const PrintClass &l, const PrintClass &r) { std::cout << ""value compare"" << std::endl; return false; } template std::ostream & operator<< (std::ostream & os, std::vector const &v) { os << ""has "" << &v; return os; } template bool operator== (const std::vector &l, const std::vector &r) { std::cout << ""const vector compare"" << std::endl; return false; } BOOST_AUTO_TEST_CASE(test_print_vector_int) { const std::vector a{1}; const std::vector b{2}; std::cout << a << std::endl; // work BOOST_CHECK_EQUAL(a, b); // don't work. // error: static assertion failed: Type has to implement operator<< to be printable //std::cout << boost::has_left_shift>::value << endl; // use user define class is ok std::vector c{PrintClass()}; std::vector d{PrintClass()}; std::cout << c << std::endl; // work BOOST_CHECK_EQUAL(c, d); // work } " Bugs closed To Be Determined test Boost 1.61.0 Problem invalid