dmd.impcnvtab
Provides an implicit conversion table for basic types.
Discussion
Used to determine integer promotions and common types.
Specification: Integer Promotions, Usual Arithmetic Conversions.
License
Source: impcnvtab.d
Documentation: https://dlang.org/phobos/dmd_impcnvtab.html
-
Declaration
pure nothrow @nogc @safe TY
implicitConvCommonTy
(TYty1
, TYty2
);If
ty1
andty2
are basic types, return the TY that both can be implicitly converted to.Parameters
TY
ty1
first operand type
TY
ty2
second operand type
Return Value
ty = common type, else Terror
-
Declaration
pure nothrow @nogc @safe TY
implicitConvTy1
(TYty1
, TYty2
);If
ty1
andty2
are basic types, return the TY thatty1
can be implicitly converted to to bring them to a common ty. It's symmetric, i.e. the operands can be swapped.Parameters
TY
ty1
first operand type
TY
ty2
second operand type
Return Value
ty = what
ty1
should be converted to, else Terror