Module tanya.meta.metafunction
This module is suited for computations on template arguments, both types and
values at compile time.
It contains different algorithms for iterating, searching and modifying
template arguments.
Structs
Name  Description 
Pack

Holds a typed sequence of template parameters.

Set

Unordered sequence of unique aliases.

Templates
Name  Description 
ApplyLeft


ApplyRight


templateAnd

Combines multiple templates with logical AND. So templateAnd
evaluates to Preds[0] && Preds[1] && Preds[2] and so on.

templateNot


templateOr

Combines multiple templates with logical OR. So templateOr
evaluates to Preds[0]  Preds[1]  Preds[2] and so on.

Manifest constants
Name  Type  Description 
allSatisfy


Tests whether all the items of L satisfy the condition
F.

anySatisfy


Tests whether any of the items of L satisfy the condition
F.

canFind


Looks for T in L and returns true if it
could be found and false otherwise.

isEqual


Tests whether Args[0] is equal to Args[1] .

isGreater


Tests whether Args[0] is greater than
Args[1] according to cmp.

isGreaterEqual


Tests whether Args[0] is greater than or equal to
Args[1] according to cmp.

isLess


Tests whether Args[0] is less than
Args[1] according to cmp.

isLessEqual


Tests whether Args[0] is less than or equal to
Args[1] according to cmp.

isNotEqual


Tests whether Args[0] isn't equal to
Args[1] .

isSorted


Tests whether L is sorted in ascending order according to
cmp.

staticIndexOf


Returns the index of the first occurrence of T in L.
1 is returned if T is not found.

Aliases
Name  Type  Description 
Alias

T

Creates an alias for T.

AliasSeq

Args

Holds a sequence of aliases.

aliasSeqOf

AliasSeq!()

Converts an input range range into an alias sequence.

DerivedToFront

Sort!(DerivedToFrontCmp,L)

Returns L sorted in such a way that the most derived types come
first.

Difference

Set!()

Produces a Set that contains all elements of
S1 that are not members of S2.

Enumerate

EnumerateFrom!(0,Args)

Attaces a numeric index to each element from Args.

EnumerateFrom

AliasSeq!()

Attaces a numeric index to each element from Args.

Erase

EraseOne!(T,L)

Removes the first occurrence of T from the alias sequence
L.

EraseAll

EraseAllImpl!(T,L)

Removes all occurrences of T from the alias sequence L.

Filter

AliasSeq!()

Returns an alias sequence which contains only items that satisfy the
condition pred.

Instantiate

T!Args

Instantiates the template T with Args.

Intersection

Set!()

Produces a Set that containing elements of
Sets[0] that are also elements of all other sets in
Sets.

Map

AliasSeq!()

Applies F to all elements of T.

Max

Alias!(Args[0])

Finds the maximum value in Args according to pred.

Min

Alias!(Args[0])

Finds the minimum value in Args according to pred.

MostDerived

T

Returns the type from the type tuple L that is most derived from
T.

NoDuplicates

AliasSeq!()

Removes all duplicates from the alias sequence L.

Repeat

L


Replace

ReplaceOne!(T,U,L)

Replaces the first occurrence of T in L with
U.

ReplaceAll

ReplaceAllImpl!(T,U,L)

Replaces all occurrences of T in L with U.

Reverse

AliasSeq!()


Select

T[0]

Aliases itself to T[0] if cond is true,
to T[1] if false.

Sort

L

Sorts L in ascending order according to cmp.

Stride

AliasSeq!(Args[0],Stride!(n,Args[n..__dollar]))

Produces a alias sequence consisting of every nth element of
Args, starting with the first.

Union

Set!(Impl!Sets)

Produces a Set containing all elements of the given
Sets.

ZipWith

Iterate!(0,Packs)

Zips one or more Packs with f.
