[Issue 2460] Ref functions can't be template functions.
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Mon May 24 08:59:24 PDT 2010
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=2460
Masahiro Nakagawa <repeatedly at gmail.com> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |repeatedly at gmail.com
--- Comment #2 from Masahiro Nakagawa <repeatedly at gmail.com> 2010-05-24 08:59:21 PDT ---
Today, I hit the similar problem.
In the latest dmd, above code works but variadic version doesn't works.
struct Foo
{
    // works! I use this for workaround
    template foo(Args...) if (true)
    {
        ref Foo foo(Args args)
        {
            return this;
        }
    }
    // doesn't work. I want use this!!
    ref Foo foo(Args...)(Args args) if (true)
    {
        return this;
    }
    // works!
    ref Foo foo(Args...)(Args args)
    {
        return this;
    }
}
-- 
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