https://issues.dlang.org/show_bug.cgi?id=20266
Issue ID: 20266
Summary: __PARAMETERS__ for easy forwarding of function
arguments
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: phobos
Assignee: [email protected]
Reporter: [email protected]
I often find myself wanting to forward arguments to another function, most
commonly for logging. For example:
-----
void setupTimer ( ulong index, ulong timer_id, Duration duration )
{
log.trace(__FUNCTION__, index, timer_id, duration);
...
}
-----
But I always have to pass the parameters manually. It would be very convenient
if I could write it like this:
-----
void setupTimer ( ulong index, ulong timer_id, Duration duration )
{
log.trace(__FUNCTION__, __PARAMETERS__);
...
}
-----
--