I have a std::tuple
e.g.
std::tuple<uint16_t, uint16_t, uint32_t> key{};
std::tuple<uint16_t, uint16_t, uint32_t> key2{};
const auto [k, p, r] = key;
and I want to compare with a second tuple but only the first two args. Something like that:
if(std::tie(k, p, std::ignore) < std::tie(key)) { ... }
If I do it in the this way, I get the following error:
error C2338: cannot compare tuples of different sizes
How can I do that?
EDIT1:
Both tuple have the same size. I seen how two compare on EQUAlITY with std::tie()
but it would be nicer I could write:
if(std::tie(k, p, std::ignore) == std::tie(key)) { ... }
EDIT2:
Also what if I want this:
if(std::tie(k, std::ignore, p) == std::tie(key)) { ... }