Prelude:
std::tuple<int, int, int> f(); std::tuple<int, int, float, int> g();
C ++ 1z will introduce syntax for structured bindings that will allow writing instead
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 some components, for example:
std::tie(a, b, std::ignore, c) = g();
Is it possible to do something similar using the new structured binding syntax? How it works?
c ++ language-lawyer c ++ 1z
jotik Nov 18 '16 at 9:08 2016-11-18 09:08
source share