[Issue 24851] New: Some members of CustomFloat can have const this

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Nov 10 12:52:56 UTC 2024


https://issues.dlang.org/show_bug.cgi?id=24851

          Issue ID: 24851
           Summary: Some members of CustomFloat can have const this
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: tim.dlang at t-online.de

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);
```

--


More information about the Digitalmars-d-bugs mailing list