extractInjected

Take an AliasSeq of types and/or Injected values and return a ValueSeq of Injected values, where any Types are converted to nameless Injected values for that type.

template extractInjected (
Args...
) {}

Members

Aliases

extractInjected
alias extractInjected = staticMap!(toInjected, Args)
Undocumented in source.

Examples

import std.meta : AliasSeq;

static assert(is(extractInjected!(int, string) == AliasSeq!(Injected!int, Injected!string)));
static assert(is(extractInjected!(Injected!float) == AliasSeq!(Injected!float)));
static assert(is(extractInjected!(Injected!(int, "foo")) == AliasSeq!(Injected!(int, "foo"))));

static assert(is(extractInjected!(Injected!(string, "name"), int, Injected!(void*)) == AliasSeq!(Injected!(string, "name"), Injected!int, Injected!(void*))));

static assert(!__traits(compiles, extractInjected!("hi", int)));

Meta