www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - =?UTF-8?B?W0lzc3VlIDI0NjQ3XSBOZXc6IE5vbiBjb3B5YWJsZSB0eXBlcyBj?=

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).

--
Jul 03