miniFormat

private fnstring miniFormat(V)(const scope ref V v)

Generates a textual representation of v without relying on Phobos. The value is formatted as follows:

  • primitive types and arrays yield their respective literals
  • pointers are printed as hexadecimal numbers
  • enum members are represented by their name
  • user-defined types are formatted by either calling toString

if defined or printing all members, e.g. S(1, 2)

Note that unions are rejected because this method cannot determine which member is valid when calling this method.

Parameters

vthe value to print

Returns

a string respresenting v or V.stringof if V is not supported