I am legitimately intrigued why both the topic you linked, and
many others never talk about a left operand from another type than
Because it does not really matter. What works for
std::ostream works similar for other types. Sorry, but its a bit like getting an example of overloading
operator+ for a type
Foo and then complaining that you never get an example of how to overload it for a
Bar. If you want your type to offer a
operator<< then yes, you implemented it in way that works.
Your code seems to be correct. Whether it does what you want, only you can decide.