vmeta.uda

Utility templates that help working with User Defined Attributes

Members

Templates

UDATuple
template UDATuple(alias UDA, alias Sym)

Eager version of findNextUDA that represent all instances of UDA in a Tuple. If one of the attribute is a type instead of an instance, compilation will fail.

findFirstUDA
template findFirstUDA(alias UDA, alias Symbol, bool allow_types = false)
template findFirstUDA(UDA, alias Symbol, bool allow_types = false)

Small convenience wrapper to find and extract certain UDA from given type. Will stop on first element which is of required type.

findNextUDA
template findNextUDA(alias UDA, alias Symbol, long idx, bool allow_types = false)
template findNextUDA(UDA, alias Symbol, long idx, bool allow_types = false)

Small convenience wrapper to find and extract certain UDA from given type. Will start at the given index and stop on the next element which is of required type.

onlyAsUda
template onlyAsUda(string from)

Avoid repeating the same error message again and again.

Meta

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.

Authors

Sönke Ludwig, Михаил Страшун