cpp-toolbox  0.0.1
A toolbox library for C++
Loading...
Searching...
No Matches
toolbox::functional::detail_impl::MemoizeHelperState< R, Args > Struct Template Reference

#include <functional_impl.hpp>

Public Types

using FuncType = std::function< R(Args...)>
 
using KeyType = std::tuple< std::decay_t< Args >... >
 
using ResultType = R
 

Public Member Functions

 MemoizeHelperState (FuncType f)
 

Public Attributes

FuncType original_func_
 
std::map< KeyType, ResultTypecache_
 
std::mutex cache_mutex_
 

Member Typedef Documentation

◆ FuncType

template<typename R , typename... Args>
using toolbox::functional::detail_impl::MemoizeHelperState< R, Args >::FuncType = std::function<R(Args...)>

◆ KeyType

template<typename R , typename... Args>
using toolbox::functional::detail_impl::MemoizeHelperState< R, Args >::KeyType = std::tuple<std::decay_t<Args>...>

◆ ResultType

template<typename R , typename... Args>
using toolbox::functional::detail_impl::MemoizeHelperState< R, Args >::ResultType = R

Constructor & Destructor Documentation

◆ MemoizeHelperState()

template<typename R , typename... Args>
toolbox::functional::detail_impl::MemoizeHelperState< R, Args >::MemoizeHelperState ( FuncType  f)
inlineexplicit

Member Data Documentation

◆ cache_

template<typename R , typename... Args>
std::map<KeyType, ResultType> toolbox::functional::detail_impl::MemoizeHelperState< R, Args >::cache_

◆ cache_mutex_

template<typename R , typename... Args>
std::mutex toolbox::functional::detail_impl::MemoizeHelperState< R, Args >::cache_mutex_

◆ original_func_

template<typename R , typename... Args>
FuncType toolbox::functional::detail_impl::MemoizeHelperState< R, Args >::original_func_

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