Can someone tell me why we need to std::forward both the function parameter AND the parameters to that function? |
Function objects A function object type is an object type that can be the type of the postfix-expression in a function call. A function object is an object of a function object type. In the places where one would expect to pass a pointer to a function to an algorithmic template, the interface is specified to accept a function object. This not only makes algorithmic templates work with pointers to functions, but also enables them to work with arbitrary function objects. - IS |
|
|