On 07.10.22 07:06, bauss wrote:
If you don't need to assign it then you can cast it.

```
void a(int x) { ... }

a(cast(int)char.max);
```

Even though in the example above the cast isn't necessary, if you want to be sure a(int) is called then you must cast it, since an overload of char will obviously be picked.

You can also do that without a cast:

    a(int(char.max));

Does the same thing of course, but it's less dangerous than casting.

Reply via email to