ich glaube er will sowas:
#include <iostream>
#include <map>
#include <iterator>
enum relationship { twins, adversaries, counterparts, enemies, team };
char const * const relationship_names[] {
"twins", "adversaries", "counterparts", "enemies", "team"
};
namespace gotham_city {
enum character {
batman, robin, catwoman, riddler, joker, penguin,
clayface, poison_ivy, mr_feeze, peri_kabuki, gale_kabuki
};
char const * const character_names[] {
"batman", "robin", "catwoman", "riddler", "joker", "penguin",
"clayface", "poison ivy", "mr. feeze", "peri kabuki", "gale Kabuki"
};
std::ostream& operator<<(std::ostream &os, character const &f)
{
return os << character_names[f];
}
}
using freak = gotham_city::character;
using constellation = std::pair<freak, freak>;
auto operator,(freak c1, freak c2) { return std::make_pair(c1, c2); }
std::ostream& operator<<(std::ostream &os, constellation const &c)
{
return os << c.first << ' ' << c.second;
}
std::ostream& operator<<(std::ostream &os, relationship const &r)
{
return os << relationship_names[r];
}
int main()
{
using namespace gotham_city;
std::map<constellation, relationship> people;
people[batman, robin] = team;
people[peri_kabuki, gale_kabuki] = twins;
for (auto const &[constellation, relationship] : people)
std::cout << constellation << ": " << relationship << '\n';
}