# 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.

#### Authors

Walter Bright

#### License

Boost License 1.0

Source: impcnvtab.d

Documentation: https://dlang.org/phobos/dmd_impcnvtab.html

Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/impcnvtab.d

- `implicitConvCommonTy`

  #### Declaration

  `pure nothrow @nogc @safe TY `implicitConvCommonTy`(TY `ty1`, TY `ty2`);`

  If `ty1` and `ty2` 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

- `implicitConvTy1`

  #### Declaration

  `pure nothrow @nogc @safe TY `implicitConvTy1`(TY `ty1`, TY `ty2`);`

  If `ty1` and `ty2` are basic types, return the TY that `ty1` 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