Generic pure functions memoization
Thanks to an answer to a similar question on StackOverflow (thanks @200_success), I improved the implementation of operator(). Using _memory.count is pretty inefficient compared to _memory.find since the latter will stop once the first corresponding key is found:

auto operator()(Args... args)
    -&gt; Ret
{
    const auto t_args = std::make_tuple(args...);
    auto it = _memory.find(t_args);
    if (it == _memory.cend())
    {
        using val_t = typename std::unordered_map&lt;std::tuple&lt;Args...&gt;, Ret&gt;::value_type;
        it = _memory.insert(val_t(t_args, _func(args...))).first;
    }
    return it-&gt;second;
}


While the solution above is indeed better than what I had, I managed to improve it even more: the results of _func should be directly constructed into _memory thanks to the piecewise construction of std::pair:

template&lt;typename Ret, typename... Args&gt;
auto MemoizedFunction&lt;Ret, Args...&gt;::operator()(Args... args)
    -&gt; Ret
{
    const auto t_args = std::make_tuple(args...);
    auto it = _memory.find(t_args);
    if (it == _memory.cend())
    {
        it = _memory.emplace(std::piecewise_construct,
                             std::forward_as_tuple(t_args),
                             std::forward_as_tuple(_func(args...))
                        ).first;
    }
    return it-&gt;second;
}


Now, operator() is far better than it originally was. I don't know whether it is still possible to improve it or not though.