stdignore(3)
std::ignore - std::ignore
Synopsis
Defined in header <tuple>
const /unspecified/ ignore; (since C++11)
Example
unpack a pair returned by set.insert(), but only save the boolean. // Run this code
#include <iostream>
#include <string>
#include <set>
#include <tuple>
int main()
{
std::set<std::string> set_of_str;
bool inserted = false;
std::tie(std::ignore, inserted) = set_of_str.insert("Test");
if (inserted) {
std::cout << "Value was inserted successfully\n";
}
}
Output:
See also