Applies const to the given type.
Applies immutable to the given type.
Applies inout to the given type.
Takes a type which is an associative array and evaluates to the type of the keys in that associative array.
Applies shared to the given type.
Takes a type which is an associative array and evaluates to the type of the values in that associative array.
Whether the given type is an "aggregate type" - i.e. a struct, class, interface, or union.
Whether the given type is a dynamic array (or what is sometimes referred to as a slice, since a dynamic array in D is a slice of memory).
Whether the given values are equal per ==.
Whether the given type is one of the built-in floating-point types, ignoring all qualifiers.
Whether the type From is implicitly convertible to the type To.
Whether the given type is one of the built-in integer types, ignoring all qualifiers.
Whether the given type is one of the built-in numeric types, ignoring all qualifiers. It's equivalent to isInteger!T || isFloatingPoint!T, but it only involves a single template instantation instead of two.
Whether the given type is a pointer.
Whether From is qualifier-convertible to To.
Whether the given symbols are the same symbol.
Whether the given types are the same type.
Whether the given type is one of the built-in signed integer types, ignoring all qualifiers.
Whether type T is a static array.
Whether the given type is one of the built-in unsigned integer types, ignoring all qualifiers.
Creates an lvalue or rvalue of type T to be used in conjunction with is(typeof(...)) or __traits(compiles, ...).
Creates an lvalue or rvalue of type T to be used in conjunction with is(typeof(...)) or __traits(compiles, ...).
Evaluates to an AliasSeq containing the members of an enum type.
Evaluates to an AliasSeq of the names (as strings) of the member variables of an aggregate type (i.e. a struct, class, interface, or union).
Evaluates to an AliasSeq of the symbols for the member variables of an aggregate type (i.e. a struct, class, interface, or union).
Evaluates to an AliasSeq of the types of the member variables of an aggregate type (i.e. a struct, class, interface, or union).
Evaluates to the original / ultimate base type of an enum type - or for non-enum types, it evaluates to the type that it's given.
Removes the outer layer of const, inout, or immutable from type T.
Removes the outer layer of all type qualifiers from type T - this includes shared.
Removes the outer layer of shared from type T.
Whether the given values are equal per ==.
Whether the type From is implicitly convertible to the type To.
Evaluates to true if the given type or symbol is an instantiation of the given template.
Whether From is qualifier-convertible to To.
Whether the given symbols are the same symbol.
Whether the given types are the same type.
Templates which extract information about types and symbols at compile time.
In the context of phobos.sys.traits, a "trait" is a template which provides information about a type or symbol. Most traits evaluate to true or false, telling the code using it whether the given arguments match / have that specific trait (e.g. whether the given type is a dynamic array or whether the given function is @safe). However, some traits may provide other kinds of information about a type (e.g. the trait could evaluate to the base type for an enum type, or it could strip const from the type to provide the mutable version of that type).
These traits are then used primarily in template constraints so that they can test that the template arguments meet the criteria required by those templates, though they can be useful in a variety of compile-time contexts (e.g. the condition of a static if).
Note that unless otherwise specified, the isXXXX and hasXXX traits in this module are checking for exact matches, so base types (e.g. with enums) and other implicit conversions do not factor into whether such traits are true or false. The type itself is being checked, not what it can be converted to.
This is because these traits are often used in templated constraints, and having a type pass a template constraint based on an implicit conversion but then not have the implicit conversion actually take place (which it won't unless the template does something to force it internally) can lead to either compilation errors or subtle behavioral differences - and even when the conversion is done explicitly within a templated function, since it's not done at the call site, it can still lead to subtle bugs in some cases (e.g. if slicing a static array is involved).
So, it's typically best to be explicit and clear about a template constraint accepting any kind of implicit conversion rather than having it buried in a trait where programmers stand a good chance of using the trait without realizing that enums might pass based on their base type - or that a type might pass based on some other implicit conversion.
Regardless of what a trait is testing for, the documentation strives to be very clear about what the trait does, and of course, the names do try to make it clear as well - though obviously, only so much information can be put into a name, and some folks will misintrepret some symbols no matter how well they're named. So, please be sure that you clearly understand what these traits do when using them, since messing up template constraints can unfortunately be a great way to introduce subtle bugs into your program. Either way, of course, unit tests are your friends.