July 03, 2024 [Issue 24647] New: Non copyable types can’t do postfix increment/decrement | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=24647 Issue ID: 24647 Summary: Non copyable types can’t do postfix increment/decrement Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: qs.il.paperinik@gmail.com While technically, `x++` means `x` is copied and the copy isn’t used, for non-copyable types, that means `x++` can’t compile. Maybe allow postfix increment for non-copyable types if the result isn’t used and make it mean `++x` (which is what it means for copyable types). -- |
Copyright © 1999-2021 by the D Language Foundation