I wrote this really trivial class so that it\'s clear what my problem is:
class A
{
public:
int x;
A(int y) {x=y;}
bool operator==(const A &o
This is a supplement to the excellent answer from John Dibling. The problem seems to be that there needs to be an output operator in the right namespace. So if you have a global output operator<< defined, then you may avoid this error (at least with Visual Studio 2015, aka vc14, and boost 1.60) by defining another one in the boost::test_tools::tt_detail namespace that forwards to the global operator. This minor tweak enables one to avoid a strange and more verbose specialization of the print_log_value class. Here is what I did:
namespace boost {
namespace test_tools {
namespace tt_detail {
std::ostream& operator<<(std::ostream& os, Mdi::Timestamp const& ts)
{
return ::operator<<(os, ts);
}
} // namespace tt_detail
} // namespace test_tools
} // namespace boost
While it has been three years since this question and answer have been posted, I have not seen this discussed clearly in the Boost.Test documentation.