Template Struct NoDiscard

Struct Documentation

template<typename F>
struct NoDiscard

can be used to wrap a callable and make its call operator [[nodiscard]]

Note

this will not be needed in C++23

Public Functions

inline NoDiscard(const F &ff)
inline NoDiscard(F &&ff)
template<typename ...T>
inline constexpr auto operator()(T&&... t) const noexcept(noexcept(f(std::forward<T>(t)...)))

Public Members

F f