(git HEAD) std.datetime spewing deprecation messages
Jonathan M Davis via Digitalmars-d
digitalmars-d at puremagic.com
Fri Jun 6 02:35:27 PDT 2014
On Fri, 06 Jun 2014 08:14:13 +0000
Dicebot via Digitalmars-d <digitalmars-d at puremagic.com> 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
More information about the Digitalmars-d
mailing list