39 if (this->
f_ ==
nullptr)
41 return this->
f_(std::forward<Args>(args)...);
Lightweight wrapper for template platform lambdas (stateless function pointers only).
optional< T > operator()(Args &&...args)
Call the lambda, returning nullopt if no lambda is set.
optional< T > call(Args &&...args)
Alias for operator() for compatibility.
optional< T >(* f_)(Args...)
bool has_value() const
Check if a lambda is set.
void set(optional< T >(*f)(Args...))
Set the lambda function pointer.
Providing packet encoding functions for exchanging data with a remote host.
const nullopt_t nullopt((nullopt_t::init()))