I\'m using a std::tuple
and defined a class enum to somehow \"naming\" each of the tuple\'s fields, forgetting about their actual indexes.
So instead o
A completely different solution would be:
A& my_field(std::tuple& t) { return std::get<0>(t); }
A const& my_field(std::tuple const& t) { return std::get<0>(t); }
B& my_other_field(std::tuple& t) { return std::get<1>(t); }
B const& my_other_field(std::tuple const& t) { return std::get<1>(t); }
my_field(t) = blah;
my_other_field(t) = frob;