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 TYimplicitConvCommonTy(TYty1, TYty2);If
ty1andty2are basic types, return the TY that both can be implicitly converted to.Parameters
TYty1first operand type
TYty2second operand type
Return Value
ty = common type, else Terror
-
Declaration
pure nothrow @nogc @safe TYimplicitConvTy1(TYty1, TYty2);If
ty1andty2are basic types, return the TY thatty1can be implicitly converted to to bring them to a common ty. It's symmetric, i.e. the operands can be swapped.Parameters
TYty1first operand type
TYty2second operand type
Return Value
ty = what
ty1should be converted to, else Terror