This is mostly a curiosity question.
I saw code like this (I'm not interested in what it does)
constexpr auto xxx = boost::hana::overload(
[](SomeType& x){ /* x is used and something is returned */ },
[](SomeOtherType1&){ /* no-op in this case */ },
[](SomeOtherType2&){ /* no-op in this case */ }
);
where the latter two lambdas just ignore their argument.
Since I know that boost::hana::always
is to create a function which ignores its arguments and always returns the argument passed to always
, I was wandering if Hana (or another library) offers a similar function to ignore one argument (or also all arguments), such that the two lambdas can be both replaced by, say, blackHole
, which I know wouldn't really be a mathematical function.
When I saw a result on cppreference for std::ignore
I was hurray-ing, but no... it's a totally different thing.