Traits are extensions to the D programming language to enable programs, at compile time, to get at information internal to the compiler. This is also known as compile time reflection.
GNU D implements a __traits(getTargetInfo) trait that receives a string
key as its argument.  The result is an expression describing the requested
target information.
version (OSX)
{
    static assert(__traits(getTargetInfo, "objectFormat") == "macho");
}
Keys for the trait are implementation defined, allowing target-specific data for exotic targets. A reliable subset exists which a D compiler must recognize. These are documented by the D language specification hosted at https://dlang.org/spec/traits.html#getTargetInfo.
The following keys are recognized by GNU D.
cppRuntimeLibraryThe C++ runtime library affinity for this toolchain.
cppStdThe version of the C++ standard supported by extern(C++) code,
equivalent to the __cplusplus macro in a C++ compiler.
floatAbiFloating point ABI; may be ‘hard’, ‘soft’, or ‘softfp’.
objectFormatTarget object format.