fp
Functional Programming extensions to C++ for ROS projects.
fp::NoDiscard< F > Struct Template Reference

#include <no_discard.hpp>

Public Member Functions

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

Public Attributes

f_
 

Detailed Description

template<typename F>
struct fp::NoDiscard< F >

Examples
no_discard.cpp.

Definition at line 41 of file no_discard.hpp.

Constructor & Destructor Documentation

◆ NoDiscard()

template<typename F >
fp::NoDiscard< F >::NoDiscard ( F const &  f)
inline

Definition at line 43 of file no_discard.hpp.

Member Function Documentation

◆ operator()()

template<typename F >
template<typename... T>
constexpr auto fp::NoDiscard< F >::operator() ( T &&...  t) const
inlineconstexprnoexcept

Definition at line 45 of file no_discard.hpp.

Member Data Documentation

◆ f_

template<typename F >
F fp::NoDiscard< F >::f_

Definition at line 42 of file no_discard.hpp.