The OpenD Programming Language

Replace

Returns an AliasSeq created from TList with the first occurrence of T, if found, replaced with U.

  1. template Replace(T, U, TList...)
  2. template Replace(alias T, U, TList...)
  3. template Replace(T, alias U, TList...)
  4. template Replace(alias T, alias U, TList...)
    template Replace (
    TList...
    ) {}

Examples

alias Types = AliasSeq!(int, long, long, int, float);

alias TL = Replace!(long, char, Types);
static assert(is(TL == AliasSeq!(int, char, long, int, float)));

Meta