isSigned

Determines whether T is a signed numeric type.

Signed numeric types are:

  • byte
  • short
  • int
  • long
  • float
  • double
  • real
enum bool isSigned(T);

Return Value

$(D_KEYWORD true) if T is a signed numeric type, $(D_KEYWORD false) otherwise.

Examples

static assert(isSigned!byte);
static assert(isSigned!short);
static assert(isSigned!int);
static assert(isSigned!long);
static assert(isSigned!float);
static assert(isSigned!double);
static assert(isSigned!real);

static assert(!isSigned!ubyte);
static assert(!isSigned!ushort);
static assert(!isSigned!uint);
static assert(!isSigned!ulong);

See Also

$(D_PSYMBOL isUnsigned).

Meta