
AMDG John Dlugosz wrote:
Ah yes, I remember reading that extra parameters called are simply ignored, and the rationale that this is generally good for callbacks.
And, you clarify that the extra arguments are dropped, as opposed to filling in extra args for the binded target. I was wondering if you could pass the "incoming" signature separate from having it deduced from the first argument to bind.
I'm not quite sure what you mean. Bind doesn't care about the signature of the first argument. It just tries to call it with whatever arguments it's given. The type checking happens then.
As it exists now, "bind" supplies all arguments to the bound call, some of which may be placeholders. You don't leave off trailing placeholders. Right? There is no "bind first n" function. Now your example shows extra arguments ignored when calling the function object returned by bind, but the desired type was never given.
function
callback; callback= bind... Will that, in general, adapt the result of bind when assigned? More to the point, what is the purpose of the signature in the function object, if the function's operator() takes anything and throws away extras, besides? I'm basically lost when it comes to what is typed, where, and when.
function