Q: Call function for each variadic argument with FastDelegate Using FastDelegate library, is it possible to create a delegate able to call the desired function for each argument of a parameter pack from the caller? As opposed to calling the function once with all arguments. Also supporting the function being object-based.
In other words, an option to replace this kind of approach:
template<typename F, typename... T>
void ForEachArgument(F function, T&&... args)
{
    for (auto& arg : { args... })
    {
        function(arg);
    }
}

class CNetworkMenu
{
    void RemoveItemByAction(int);

    template<typename... T>
    void RemoveItemsByActions(T... args)
    {
        ForEachArgument([&](int arg)
        {
            RemoveItemByAction(arg);
        }, args...);
    }
}


A: FastDelegate does not seem to provide something to avoid writing ForEachArgument. FastDelegate would rather replace your use of a lambda, but I don't know how it works.
However, you could optimize ForEachArguement, by making sure you do not copy arguments. Here, RemoveItemsByActions(T... args) requires taking the ownership to the arguments (aka by value), then moves them down to ForEachArgument's { args... }. The for loop refers to these args by reference (auto& arg) and passes them to your lambda, which takes the arg by value. If arg was not an int, it would trigger an unneeded copy.
To avoid this and give as much room to the compiler as possible to optimize the work, I would try to unpack the values using the templates, and make sure that universal references are used all across. Here is the trick:
template<typename F, typename T>
void for_each_any(F&& function, T&& next_arg)
{
    function(next_arg);
}

template<typename F, typename T, typename... U>
void for_each_any(F&& function, T&& next_arg, U&&... args)
{
    function(next_arg);
    for_each_any(std::forward<F>(function), std::forward<U>(args)...);
}

See it in action here. I have put your solution here.
Then I benchmarked them together here, and it shows that my proposed solution is slightly better. However there is a trade-off: my solution results in a slightly larger binary, since it uses more templates, and it compiles more slowly.
