Short answer
No, there is no such thing. You can use existing C++ features to emulate it.
Long answer
You can add a method to Location virtual void Print(ostream& os)
and implement operator<<
like this:
std::ostream& operator<<(ostream& os, const Location& loc)
{
loc.Print(os);
return os;
}
If you override Print()
in your derived classes you will get your desired functionality.