DRTVWR-494: Put streaming operator<<() for kdu_dims in kdu_core.

It seems the lookup now requires that the operator<<() function be defined in
the same namespace as the argument.
master
Nat Goodspeed 2019-12-06 16:02:28 -05:00
parent c897947bda
commit 65e00abe6f
1 changed files with 5 additions and 2 deletions

View File

@ -44,16 +44,19 @@ using namespace kdu_core;
#include <sstream>
#include <iomanip>
// stream kdu_dims to std::ostream
// Turns out this must NOT be in the anonymous namespace!
// It must also precede #include "stringize.h".
namespace kdu_core
{
// stream kdu_dims to std::ostream
inline
std::ostream& operator<<(std::ostream& out, const kdu_dims& dims)
{
return out << "(" << dims.pos.x << "," << dims.pos.y << "),"
"[" << dims.size.x << "x" << dims.size.y << "]";
}
} // namespace kdu_core
// operator<<(std::ostream&, const kdu_dims&) must precede #include "stringize.h"
#include "stringize.h"
namespace {