Template Class NoDiscard

Class Documentation

template<typename Fn>
class NoDiscard

Template for creating lambdas with the nodiscard attribute.

Template Parameters:

Fn – Lambda

Public Functions

inline NoDiscard(Fn const &fn)
template<typename ...Ts>
inline constexpr auto operator()(Ts&&... args) const noexcept(noexcept(fn_(std::forward<Ts>(args)...)))