Public Types | Public Member Functions | List of all members
CachedFunction< Function, Map > Class Template Reference

A function wrapper that caches function values. More...

#include <CachedFunction.hpp>

Public Types

using input = typename Map::key_type
 
using output = typename Map::mapped_type
 

Public Member Functions

template<typename... MapArgs>
 CachedFunction (Function function, MapArgs... map_args) noexcept
 
const output & operator() (const input &x) noexcept(noexcept(std::declval< Function >()(x)))
 Obtain the function result.
 
void clear () noexcept
 Clear the cache entries.
 

Detailed Description

template<typename Function, typename Map>
class CachedFunction< Function, Map >

A function wrapper that caches function values.


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