Bug 24851 – Some members of CustomFloat can have const this

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2024-11-10T12:52:56Z
Last change time
2024-11-10T22:25:43Z
Keywords
pull
Assigned to
No Owner
Creator
Tim

Comments

Comment #0 by tim.dlang — 2024-11-10T12:52:56Z
The following currently fails for const variables: ``` const CustomFloat!16 x = CustomFloat!16(3); assert(x.get!float == 3); assert(x.re.get!float == 3); assert(x + x == 6); assert(x + 1 == 4); assert(2 + x == 5); assert(x < 4); ```
Comment #1 by dlang-bot — 2024-11-10T12:55:34Z
@tim-dlang created dlang/phobos pull request #9083 "Fix bugzilla 24851 - Some members of CustomFloat can have const this" fixing this issue: - Fix bugzilla 24851 - Some members of CustomFloat can have const this https://github.com/dlang/phobos/pull/9083
Comment #2 by dlang-bot — 2024-11-10T22:25:43Z
dlang/phobos pull request #9083 "Fix bugzilla 24851 - Some members of CustomFloat can have const this" was merged into master: - 8b051674ccad978a6668b074ac9c345c543c414a by Tim Schendekehl: Fix bugzilla 24851 - Some members of CustomFloat can have const this https://github.com/dlang/phobos/pull/9083