I was wondering if it is possible to write a std::tie()
-like function (using template programming) that can bind select components of a tuple only, and bind others to some placeholders like those in std::bind()
. If so, one needs only declare variables for the parts he/she is interested in.
For example,
std::tie(x,_1,y,_2) = (2,3,4,5);
Are you looking for
std::ignore
?i.e.: