On 11/04/2017 06:48, Peter Dimov via Boost wrote:
Getting the arguments as a tuple that includes the class type as a first parameter raises the obvious question of
void(foo::*)(float, char, int) -> tuple
void(foo::*)(float, char, int) & -> tuple I understand why that is, but it still makes args lossy and the original can't be recreated from the tuple. Trailing varargs also have the same problem, as (float) and (float, ...) map to the same tuple.
The obvious theoretically consistent approach here is
void(foo::*)(float, char, int) -> tuple
and
void(float, ...) -> tuple
which would be fully reversible but could possibly be less convenient in practice.
Perhaps in the first case it should specify a pointer type instead? That seems reasonably natural to me as the actual type of the "this" parameter, though I don't have any standardese in particular to back that up.