www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18246] New: [spec] "arithmetic type", not defined in


          Issue ID: 18246
           Summary: [spec] "arithmetic type", not defined in
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dlang.org
          Assignee: nobody puremagic.com
          Reporter: hsteoh quickfur.ath.cx

On https://dlang.org/spec/traits.html, section 25.1, __traits(isArithmetic, T)
is defined as returning true if T is an arithmetic type.  However, what exactly
constitutes an arithmetic type is not stated.  Are pointers considered
arithmetic types, since D does have pointer *arithmetic*?

It would be best if the spec explicitly listed exactly which types are
considered "arithmetic types", or for that matter "unsigned types", etc.,
rather than leaving it up to interpretation.

Jan 16 2018