On Friday, 6 June 2014 at 10:35:58 UTC, monarch_dodra wrote:
On Friday, 6 June 2014 at 09:35:56 UTC, Jonathan M Davis via Digitalmars-d wrote:
On Fri, 06 Jun 2014 08:14:13 +0000
Dicebot via Digitalmars-d <[email protected]> wrote:

On Friday, 6 June 2014 at 00:34:19 UTC, Jonathan M Davis via
Digitalmars-d wrote:
> And like with them, it's impossible to use ref for this,
> because you can't use
> ref with variadic template arguments.

Wait what?

void foo(T...)(ref T args)
{
 args[0] = 42;
}

void main()
{
 int x;
 foo(x);
 assert(x == 42);
}

Well, that's new then. You didn't used to be able to do that. I clearly missed that change. Thanks for the correction. I'd still use pointers in this case though, since it's clearer and consistent with existing code like getopt.

- Jonathan M Davis

And strongly @system.

This alone is absolutely blocking objection against pointer-based decomposition in my opinion.

Liked simple design with returning struct most.

Reply via email to