www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 6409] New: std.array.empty for associative arrays too


           Summary: std.array.empty for associative arrays too
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc

--- Comment #0 from bearophile_hugs eml.cc 2011-07-30 06:57:28 PDT ---
I suggest to extend std.array.empty to work with associative arrays too:

import std.array;
void main() {
    int[] a;
    assert(a.empty); // OK
    int[int] aa;
    assert(aa.empty); // Error

DMD 2.054:
test.d(6): Error: template std.array.empty(T) does not match any function
template declaration
test.d(6): Error: template std.array.empty(T) cannot deduce template function
from argument types !()(int[int])

Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 30 2011