I have the following code in a header only file.
#pragma once
class error_code {
public:
unsigned __int64 hi;
unsigned __int64 lo;
};
std::ostr
Either make the function inline
:
inline std::ostream& operator<< (std::ostream& o, const error_code& e) {
return o << "[" << e.hi << "," << e.lo << "]";
}
or make it a template function:
template
std::basic_ostream& operator<< (std::basic_ostream& o,
const error_code& e) {
return o << "[" << e.hi << "," << e.lo << "]";
}