# std.math: add support to cast for a comptime_int argument · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/7a89eebfc64fd81a504700e105bdc2609bb2a442)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 7a89eebfc64fd81a504700e105bdc2609bb2a442

Requested commit: 7a89eebfc64fd81a504700e105bdc2609bb2a442

Commit: 7a89eebfc64fd81a504700e105bdc2609bb2a442

Tree: 133017cd1927707e78cec899399f3c9b6ef3cd58

Author: Jacob Young

Committer: Jacob Young

## Message

```
std.math: add support to cast for a comptime_int argument

This allows converting a comptime_int to an optional integer type, which
either behaves the same as an implicit cast or produces null if the
argument is outside the range of the destination type.

```

## Parents

- [e6ebdcb82ed9fd226ef18670115b8b2617c0a392](https://git.cafe/gitcafe/zig/commit/e6ebdcb82ed9fd226ef18670115b8b2617c0a392?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/7a89eebfc64fd81a504700e105bdc2609bb2a442?format=markdown)
