Module mecca.lib.reflection
Various utilities for hacking the D type system
Functions
Name | Description |
as(func)
|
Execute a given piece of code while casting it:
|
bitEnumToString(val)
|
Convert a value to bitwise or of enum members
|
funcAttrToString(attr)
|
Return a FunctionAttribute converted to a mixinable string
|
genMoveArgument(numArgs, callString, argumentString, ret)
|
A CTFE function for generating a mixin string of a function call moving arguments
|
Structs
Name | Description |
Closure
|
Non-GC postponed function call with arguments (closure)
|
Templates
Name | Description |
CopySignature
|
CTFE template for genering a string for mixin copying a function's signature along with its default values
|
Manifest constants
Name | Type | Description |
isRefInputRange
|
|
Returns true if R is a pseudo input range with ref return.
|
Aliases
Name | Type | Description |
CapacityType
|
ubyte
|
Return the smallest type large enough to hold the numbers 0..n
|
ForeachTypeof
|
ReturnType!((){foreach(x;TU.init){returnx;}assert(0);})
|
Replace std.traits.ForeachType with one that works when the item is copyable or not
|
PromotedType
|
typeof(Type(0)+Type(0))
|
Type, unless it is smaller than int, in which case it is promoted
|