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

           Summary: [enh] overloading on attributes
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: c...@dawg.eu


--- Comment #0 from Martin Nowak <c...@dawg.eu> 2013-02-14 07:28:44 PST ---
void foo() @safe
{
}

void foo() nothrow
{
}

void bar() @safe
{
    foo();
}

void bar() nothrow
{
    foo();
}

----
This currently fails, because foo() is said to match both functions,
but at the same time it is not an error to declare the overloads.
The enhancement is to use attribute sets to resolve overloads.

- The attribute set of the caller must be a subset of the callee.
- The attribute sets of overloads must be disjoint if they have the
  same signature otherwise.
----
Some C++ AMP work has been done on this topic for restrict overloading.
http://blogs.msdn.com/b/nativeconcurrency/archive/2012/03/29/function-overloading-with-restrict-in-c-amp.aspx

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

Reply via email to