# dmd.constfold

Perform constant folding of arithmetic expressions.

#### Discussion

The routines in this module are called from `optimize.d`.

Specification: Floating Point Constant Folding

#### Authors

Walter Bright

#### License

Boost License 1.0

Source: constfold.d

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

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

- `isConst`

  #### Declaration

  `int `isConst`(Expression `e`);`

  #### Return Value

  `true` if `e` is a constant

- `cantExp`

  #### Declaration

  `void `cantExp`(out UnionExp `ue`);`

  Initialize a TOK.cantExpression Expression.

  #### Parameters

  `UnionExp `ue`` | where to write it