unstd.templates

Various stuff for working with templates.

Members

Aliases

BinaryTemplate
alias BinaryTemplate(alias Pred, EnumType = void) = Template!(Pred, 2, EnumType)

Create template from a string Pred. If Pred isn't a string, alises itself to Pred.

Inst
alias Inst(alias Template, A...) = Template!A

Instantiate a template Template using arguments A.

UnaryTemplate
alias UnaryTemplate(alias Pred, EnumType = void) = Template!(Pred, 1, EnumType)

Create template from a string Pred. If Pred isn't a string, alises itself to Pred.

binaryPred
alias binaryPred(alias pred) = BinaryTemplate!(pred, bool)

Using unaryPred or binaryPred is a convinient way to create a template with one or two arguments respectively which is an enum of type bool.

unaryPred
alias unaryPred(alias pred) = UnaryTemplate!(pred, bool)

Using unaryPred or binaryPred is a convinient way to create a template with one or two arguments respectively which is an enum of type bool.

Functions

formatBind
string formatBind(string fmt)
Undocumented in source. Be warned that the author may not have intended to support it.

Manifest constants

allArgs
enum allArgs;
Undocumented in source.
args
enum args;
Undocumented in source.

Mixin templates

Bind
mixintemplate Bind(string fmt)

Binds template arguments using format string.

Templates

BindTemplate
template BindTemplate(alias Template, BindArgs...)

Binds template arguments.

Template
template Template(alias Pred, int argumentsCount, EnumType = void)

Create template from a string Pred. If Pred isn't a string, alises itself to Pred.

andTemplates
template andTemplates(templates...)

Create predicate template returning true iff there are no templates or all templates return non-zero.

arg
template arg(size_t n)
Undocumented in source.
argsRange
template argsRange(size_t from, size_t to)
Undocumented in source.
argsToEnd
template argsToEnd(size_t from)
Undocumented in source.
notTemplate
template notTemplate(alias template_)

Create predicate template returning !template_.

orTemplates
template orTemplates(templates...)

Create predicate template returning true iff any template of templates return non-zero (i.e. returning false if there are no templates).

Meta

Authors

Denis Shelomovskij