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...
) {}

Examples

1 import std.meta : AliasSeq;
2 
3 static assert(is(extractInjected!(int, string) == AliasSeq!(Injected!int, Injected!string)));
4 static assert(is(extractInjected!(Injected!float) == AliasSeq!(Injected!float)));
5 static assert(is(extractInjected!(Injected!(int, "foo")) == AliasSeq!(Injected!(int, "foo"))));
6 
7 static assert(is(extractInjected!(Injected!(string, "name"), int, Injected!(void*)) == AliasSeq!(Injected!(string, "name"), Injected!int, Injected!(void*))));
8 
9 static assert(!__traits(compiles, extractInjected!("hi", int)));

Meta