Loss of information in the args metafunction
Closed this issue · 1 comments
ldionne commented
Issue raised in https://lists.boost.org/Archives/boost/2017/04/234374.php.
Both void(T)
and void(T, ...)
result in the same parameter list according to the args
metafunction. This results in a loss of information, and thus one can't reconstruct the original signature from the parameter list obtained by args
. One solution would be to use a special type, such as ct::varargs_t
, to represent C-style varargs.
badair commented
In generic code, I think it is more convenient to ignore varargs by default in this metafunction than to require the user to handle this special case. The user can still opt-in to handle this case by using has_varargs.