LeechCraft  0.6.70-9312-g4cc613a2df
Modular cross-platform feature rich live environment.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
LeechCraft::Util::InstanceFunctor< boost::optional< T > > Struct Template Reference

Implementation of the Functor class for boost.optional. More...

#include "functor.h"

Public Types

template<typename F >
using FmapResult_t = boost::optional< std::decay_t< std::result_of_t< F(T)>>>
 

Static Public Member Functions

template<typename F >
static FmapResult_t< F > Apply (const boost::optional< T > &t, const F &f)
 

Detailed Description

template<typename T>
struct LeechCraft::Util::InstanceFunctor< boost::optional< T > >

Implementation of the Functor class for boost.optional.

The implementation applies the function to the contents of the boost.optional if it's not empty, otherwise it just leaves an empty boost.optional.

This is analogous to the Maybe type.

Template Parameters
TThe element type contained inside the boost.optional.

Definition at line 215 of file functor.h.

Member Typedef Documentation

template<typename T >
template<typename F >
using LeechCraft::Util::InstanceFunctor< boost::optional< T > >::FmapResult_t = boost::optional<std::decay_t<std::result_of_t<F (T)>>>

Definition at line 218 of file functor.h.

Member Function Documentation

template<typename T >
template<typename F >
static FmapResult_t<F> LeechCraft::Util::InstanceFunctor< boost::optional< T > >::Apply ( const boost::optional< T > &  t,
const F &  f 
)
inlinestatic

Definition at line 221 of file functor.h.

References LeechCraft::Util::Invoke().

+ Here is the call graph for this function:


The documentation for this struct was generated from the following file: