core.internal.array.operations

This module contains support array (vector) operations

Functions 1

fnT[] arrayOp(T : T[], Args...)(T[] res, Filter!(isType, Args) args) @trusted Perform array (vector) operations and store the result in `res`. Operand types and operations are passed as template arguments in Reverse Polish * Notation (RPN).

Templates 4

tmpltypeCheck(bool fail, T, Args...)

Check whether operations on operand types are supported. This template recursively reduces the expression tree and determines intermediate types. Type checking is done here rather than in the compiler to provide more detailed error messages.

Parameters

failwhether to fail (static assert) with a human-friendly error message
Ttype of result
Argsoperand types and operations in RPN

Returns

The resulting type of the expression

See Also

tmpltypeCheck(bool fail, T, ResultType)

ditto

tmplnot(alias tmlp)
tmplstaticIndexOf(alias pred, haystack...)

Find element in haystack for which pred is true.

Parameters

predthe template predicate
haystackelements to search

Returns

The first index for which pred!haystack[index] is true or -1.