fn::discard
Defined in#include <fn/discard.hpp>
Discard the value explicitly.
This is useful when only side-effects are desired and the final value is not needed.
Use through the
fn::discard
nielbloid. Call signatures
functor< discard_t >
fn::discard_t
::
operator()
()
Unconditionally discards the value.
Return value
void
Examples
1Observe for side-effects only
42
is observed by inspect
and the value is discarded by discard
(no warning for discarded result of inspect
).