Prelude:
std::tuple<int, int, int> f();
std::tuple<int, int, float, int> g();
C++1z will introduce syntax for structured bindings which will make it possible to write instead of
int a, b, c;
std::tie(a, b, c) = f();
something like
auto [a, b, c] = f();
However, std::tie
also allowed to specify std::ignore
to ignore certain components, e.g:
std::tie(a, b, std::ignore, c) = g();
Will it be possible to do something similar using the new structured bindings syntax? How would it work?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…