std::ignore (3) - Linux Manuals
std::ignore: std::ignore
NAME
Synopsis
Defined in header <tuple>
const /*unspecified*/ ignore; (since C++11)
inline constexpr /*unspecified*/ ignore; (since C++17)
An object of unspecified type such that any value can be assigned to it with no effect. Intended for use with std::tie when unpacking a std::tuple, as a placeholder for the arguments that are not used.
Example
unpack a pair returned by set.insert(), but only save the boolean.
// Run this code
Output:
See also
tie (function template)