util.typeinfo - ICE 0.1 API documentation

ICE 0.1 API documentation

# util.typeinfo

pure nothrow bool isClass(TypeInfo type);

  Is type a class?

bool isDerivedFrom(T)(TypeInfo type);

  Is type derived from T, or does type implement T?

  If type is the same as T, it is not considered derived.

pure nothrow size_t memorySize(T)();

  Get number of bytes by an object of type T in memory.

  Unlike .sizeof, this also works for classes, i.e. size of the actual class instance, not reference, is returned.
  For arrays, this still returns size of the "fat pointer" array, object, not the size of the array content.

Copyright © Ferdinand Majerech 2011. | Page generated by AutoDDoc and Ddoc.