Bug 24142 – Allow casting Int128 to integral and floating types
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2023-09-12T11:57:03Z
Last change time
2023-09-17T23:15:42Z
Keywords
pull
Assigned to
No Owner
Creator
Nathan S.
Comments
Comment #0 by n8sh.secondary — 2023-09-12T11:57:03Z
Currently Unsupported:
---
import std.int128;
int fun1(Int128 a)
{
return cast(int) a;
}
double fun2(Int128 a)
{
return cast(double) a;
}
---
Error: template instance `opCast!int` does not match template declaration `opCast(T : bool)()`
Error: template instance `opCast!double` does not match template declaration `opCast(T : bool)()`
Comment #1 by dlang-bot — 2023-09-12T12:08:16Z
@n8sh created dlang/phobos pull request #8810 "Fix Issue 24142 - Allow casting Int128 to integral and floating types" fixing this issue:
- Fix Issue 24142 - Allow casting Int128 to integral and floating types
https://github.com/dlang/phobos/pull/8810
Comment #2 by dlang-bot — 2023-09-17T23:15:42Z
dlang/phobos pull request #8810 "Fix Issue 24142 - Allow casting Int128 to integral and floating types" was merged into master:
- 7a9cad8161b50023dd59ef2f83ecd3432c4feef2 by Nathan Sashihara:
Fix Issue 24142 - Allow casting Int128 to integral and floating types
https://github.com/dlang/phobos/pull/8810