[Issue 16070] New: std.meta.{ApplyLeft,ApplyRight} fail with mixed type/value arguments

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue May 24 11:43:58 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=16070

          Issue ID: 16070
           Summary: std.meta.{ApplyLeft,ApplyRight} fail with mixed
                    type/value arguments
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: ag0aep6g at gmail.com

Should work:
----
alias Templ(T, string name) = AliasSeq!(T, name);

alias PartialL = ApplyLeft!(Templ, int);
alias FullL = PartialL!"foo";

static assert(is(FullL[0] == int));
static assert(FullL[1] == "foo");

alias PartialR = ApplyRight!(Templ, "bar");
alias FullR = PartialR!int;

static assert(is(FullR[0] == int));
static assert(FullR[1] == "bar");
----

--


More information about the Digitalmars-d-bugs mailing list