The traits module defines tools useful for obtaining detailed compile-time information about a type. Please note that the mixed naming scheme used in this module is intentional. Templates which evaluate to a type follow the naming convention used for types, and templates which evaluate to a value follow the naming convention used for functions.

License:
BSD style: see license.txt

Authors:
Sean Kelly

  • template isCharType (T)
  • Evaluates to true if T is char, wchar, or dchar.

  • template isSignedIntegerType (T)
  • Evaluates to true if T is a signed integer type.

  • template isUnsignedIntegerType (T)
  • Evaluates to true if T is an unsigned integer type.

  • template isIntegerType (T)
  • Evaluates to true if T is a signed or unsigned integer type.

  • template isRealType (T)
  • Evaluates to true if T is a real floating-point type.

  • template isComplexType (T)
  • Evaluates to true if T is a complex floating-point type.

  • template isImaginaryType (T)
  • Evaluates to true if T is an imaginary floating-point type.

  • template isFloatingPointType (T)
  • Evaluates to true if T is any floating-point type: real, complex, or imaginary.

  • template isPointerType (T)
  • Evaluates to true if T is a pointer type.

  • template isReferenceType (T)
  • Evaluates to true if T is a a pointer, class, interface, or delegate.

  • template isDynamicArrayType (T)
  • Evaulates to true if T is a dynamic array type.

  • template isStaticArrayType (T : T[U],uint U)
  • Evaluates to true if T is a static array type.

  • template isStaticArrayType (T)
  • Evaluates to true if T is a static array type.

  • template isAssocArrayType (T)
  • Evaluates to true if T is an associative array type.

  • template isCallableType (T)
  • Evaluates to true if T is a function, function pointer, delegate, or callable object.

  • template ReturnTypeOf (Fn)
  • Evaluates to the return type of Fn. Fn is required to be a callable type.

  • template ReturnTypeOf (alias fn)
  • Evaluates to the return type of fn. fn is required to be callable.

  • template ParameterTupleOf (Fn)
  • Evaluates to a tuple representing the parameters of Fn. Fn is required to be a callable type.

  • template ParameterTupleOf (alias fn)
  • Evaluates to a tuple representing the parameters of fn. n is required to be callable.

  • template BaseTypeTupleOf (T)
  • Evaluates to a tuple representing the ancestors of T. T is required to be a class or interface type.

    Copyright (C) 2005-2006 Sean Kelly. All rights reserved. :: page rendered by CandyDoc