|
Boost Users : |
From: Steven E. Harris (seh_at_[hidden])
Date: 2006-06-14 16:58:04
Howard Hinnant <hinnant_at_[hidden]> writes:
> It would be nice if when pair<MyNamespace::MyType, int> was given to
> operator<< both namespace std and namespace MyNamespace were
> searched for viable overloads.
Thank you for the explanation.
Perhaps this is similar to the "where do I customize swap()?"
question, but one could argue that this overload should live in the
std namespace, where the least specialized template function was
declared. After all, it's std::operator<<() that we're overloading,
not MyNamespace::operator<<(). We're trying to introduce special
behavior for a particular argument type, not change the basic protocol
of the template function.
-- Steven E. Harris
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net