C++ operator lookup rules / Koenig lookup
- by John Bartholomew
While writing a test suite, I needed to provide an implementation of operator<<(std::ostream&... for Boost unit test to use.
This worked:
namespace theseus { namespace core {
std::ostream& operator<<(std::ostream& ss, const PixelRGB& p) {
return (ss << "PixelRGB(" << (int)p.r << ","…