Boost logo

Boost Users :

From: Michiel Helvensteijn (m.helvensteijn_at_[hidden])
Date: 2008-07-16 19:04:29


I understand why the types of the arguments to BOOST_CHECK_EQUAL (and
BOOST_CHECK_PREDICATE, etc.) must have operator<< correctly defined.
Otherwise, the failure message could not be properly printed.

The type I want to check is vector<int>. But it seems not to be enough to
simply define the following function:

ostream& operator<<(ostream& out, const vector<int>& vec);

The error message is long and very templatey, but the essence is:

.../test_tools.hpp:298: error: no match for 'operator<<' in 'ostr << t'

What more should I do to be able to use vector<int> in these tests?

Thanks!

-- 
Michiel Helvensteijn

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net