Module bolts

Contains a number of static reflection utilties that query compile time entities (traits) or transform them (meta). General utilties are in the modules traits and meta and most specific ones are in dedicated modules (i.e. bolts.members provides utilities over a type's members).

Most functions here operate on any compile time entity. For example isUnaryOver works in both these situatons:

int i;
void f(int) {}
isFunctionOver!(f, int);
isFunctionOver!(f, 3);
isFunctionOver!(f, i);

Iz Super Template

The iz super template. Has a lot of the traits on types encapulated in one place. So if there's a trait that tells you something about a compile time entity, chances are iz will have it. E.g:

void f(int, float, string) {}
iz!f.unaryOver!(int, float, string);
iz!f.unaryOver!(3, float, "");

All the things

Module Function Description
bolts.members memberFunctions Returns a list of all member functions
staticMembers Returns a list of of all static members
hasMember If a type has a member with certain attributes
bolts.meta TypesOf Returns an AliasSeq of the types of all values given - values can be types or expressions
Flatten Takes a list of ranges and non ranges and returns a list of types of the ranges and types of the non ranges
AliasPack Represents an AliasSeq that is not auto expanded
staticZip Zip m n-tuple AliasPacks together to form n m-tuple AliasPacks
bolts.traits isFunctionOver Checks if a function is n-ary over the passed in types
isUnaryOver Checks if a function is unary over some type
isBinaryOver Checks if a function is binary over some types
areCombinable Checks if a set of ranges and non ranges share a common type
hasProperty Tells you if a name is a member and property in a type
propertySemantics Tells you if a property has read and/or write semantics
isManifestAssignable If a member of a type can be assigned to a manifest constant
isOf Is the resolved type is of another resolved type
isNullType If T is typeof(null)
isNullable if null can be assigned to an instance of type T
StringOf Stringifies a type, unlike .stringof this version doesn't spit out mangled gibberish
isSame Returns true if a and b are the same thing - same type, same literal value, or same symbol
isRefType Checks if a compile time entity is a reference type
isValueType Checks if a compile time entity is a value type
bolts.range isSortedRange Tells you if a range is sorted
sortingPredicate Can be used to extract the sorting predicate for a range
CommonTypeOfRanges Finds the common type from a list of ranges
bolts.aa isKey Traits for a type of key used in an associative array
bolts.iz iz Allows you to query a type or alias with a nicer syntax, i.e. isNullable!T == iz!T.nullable