so i have this function```cpp
std::ostream &operator<<(std::ostream &os, const Deck &deck) {
std::ostringstream repr;
for (size_t i = 0; i < deck.cards.size(); ++i) {
repr << to_string(deck.cards[i]);
if (i != deck.cards.size() - 1) {
repr << " ";
}
}
return os << repr.str();
}
and these two structs```cpp
struct Deck {
std::vector<Card> cards;
Deck();
Card draw();
private:
void shuffle();
};
struct Hand {
std::vector<Card> cards;
void put(const Card &card);
};
both of these contains std::vector<Card> cards; and i would like the overload function above to work on instances of both Deck and Hand type, how would i do that? i know how to solve this with interfaces/protocols but cpp doesnt seem to have them