(git HEAD) std.datetime spewing deprecation messages

Jonathan M Davis via Digitalmars-d digitalmars-d at puremagic.com
Thu Jun 5 19:12:53 PDT 2014


On Fri, 06 Jun 2014 03:30:19 +0200
Artur Skawina via Digitalmars-d <digitalmars-d at puremagic.com> wrote:

> On 06/06/14 02:34, Jonathan M Davis via Digitalmars-d wrote:
> And you get an API which looks like this:
>
>    auto r = d.split!q{ days, seconds, msecs };
>    // access r.days etc

You can already do that with what I have in my current pull except that it's

    auto r = d.split!("days", "seconds", "msecs")();
    auto days = r.days;
    auto seconds = r.seconds;
    auto msecs = r.msecs;

It's up to you whether you want to pass in pointers or return a struct. Which
is better tends to depend on the context in which the function is used.

- Jonathan M Davis


More information about the Digitalmars-d mailing list