#include <boost/test/tools/detail/fwd.hpp>
#include <boost/test/tools/detail/indirections.hpp>
+#include <boost/test/utils/lazy_ostream.hpp>
#include <boost/test/tools/assertion.hpp>
#include <boost/test/tools/collection_comparison_op.hpp>
+#include <ostream>
+
#include <boost/test/detail/suppress_warnings.hpp>
//____________________________________________________________________________//
// ************************************************************************** //
//! Per element comparison manipulator, for containers
+//! This is a terminal that involves evaluation of the expression
struct per_element {};
//____________________________________________________________________________//
-inline int
-operator<<( unit_test::lazy_ostream const&, per_element ) { return 0; }
+inline unit_test::lazy_ostream&
+operator<<( unit_test::lazy_ostream &o, per_element ) { return o; }
+
+// needed for the lazy evaluation in lazy_ostream as per_element is a terminal
+inline std::ostream&
+operator<<( std::ostream& o, per_element ) { return o; }
//____________________________________________________________________________//
//____________________________________________________________________________//
-inline check_type
+inline assertion_type
operator<<( assertion_type const&, per_element )
{
- return CHECK_BUILT_ASSERTION;
+ return assertion_type(CHECK_BUILT_ASSERTION);
}
//____________________________________________________________________________//