Ultimate functor class which can read/write to l-values/r-values The aim is to provide a generic functor class which makes references able to bind to r-values. The trick is to trick the compiler into thinking that the r-value is an l-value by using a forwarding references.
Here is the code:
#include &lt;type_traits&gt;
template &lt;typename Functor&gt;
struct Function {
    Functor func;
    template &lt;typename ...Args&gt;
    inline auto operator() (Args&amp;&amp;... args) {
        //I tried to provide a suitable error message if args were not valid parameters, but I can't get it to work...
        //static_assert(std::is_invocable_v&lt;Functor, Args...&gt;);
        return func(args...);
    }
};

Example use case:
# include &lt;iostream&gt;
# include &lt;vector&gt;
int main () {
    // Define function 
    auto push_back = Function([] (std::vector&lt;int&gt;&amp; vec, int num) {vec.push_back(num); return vec;});
    auto x = std::vector{1 , 2 ,3 , 4};
    // Works on l-values
    push_back(x, 5);
    std::cout &lt;&lt; x[4] &lt;&lt; '\n'; // 5
    // Works on r-values
    auto y = push_back(std::vector{1 ,2 , 3 , 4 , 5}, 6);
    std::cout &lt;&lt; y[5] &lt;&lt; '\n'; // 6
    return 0;
}

And finally, one can do this if you want to use old-style c functions:
template &lt;typename R, typename ...Args&gt;
inline auto CFunc(R (*iFunc) (Args...)) {
    return Function&lt;R (*) (Args...)&gt;(iFunc);
}

Is this robust code? Are there edge cases I need to be aware about with which my functor class does not work? Also, how could I provide more suitable error messages, eg when typename Functor is not a functor, or when args... are not suitable parameters?
Assuming C++20, we can constrain the template (similar to your attempt at static_assert).  The key is that Args... can contain rvalue-references, but we need to convert those to lvalue types, because that's what we present to the function:
#include &lt;concepts&gt;


    template&lt;typename... Args&gt;
    inline auto operator()(Args&amp;&amp;... args)
        requires std::invocable&lt;Functor, std::add_lvalue_reference_t&lt;Args&gt;...&gt;

I don't see anything else I would propose improving.