www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12806] New: Does std.traits.isArray include associative arrays?

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

          Issue ID: 12806
           Summary: Does std.traits.isArray include associative arrays?
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: trivial
          Priority: P1
         Component: Phobos
          Assignee: nobody puremagic.com
          Reporter: peter.alexander.au gmail.com

The documentation for std.traits.isArray is:

"Detect whether type T is an array."

It is not immediately clear whether this includes associative arrays or not (it
doesn't), which has forced me to test it manually more than once.

I'd suggest changing the documentation to cast away any doubt:

"Detect whether type T is either a static or dynamic array."

--
May 26 2014