[Issue 5555] New: built-in associative array's length is nothrow

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Feb 9 08:37:51 PST 2011


http://d.puremagic.com/issues/show_bug.cgi?id=5555

           Summary: built-in associative array's length is nothrow
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P3
         Component: druntime
        AssignedTo: nobody at puremagic.com
        ReportedBy: repeatedly at gmail.com


--- Comment #0 from Masahiro Nakagawa <repeatedly at gmail.com> 2011-02-09 08:35:27 PST ---
I have following code:

    // aa is a string[string];
    nothrow bool empty() const
    {
        return aa.length == 0;
    }

I want use this code but dmd fails.

    Error: function hoge.Foo.empty 'empty' is nothrow yet may throw

built-in AA's length() depends on _aaLen in rt/aaA.d.
I think these functions should be nothrow.

This issue breaks my template engine API ;(

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


More information about the Digitalmars-d-bugs mailing list