[Issue 4215] auto ref parameters don't work with class template variables

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri May 21 05:28:55 PDT 2010


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



--- Comment #3 from Trass3r <mrmocool at gmx.de> 2010-05-21 05:28:54 PDT ---
the more general code:

template bar(T)
{
    void bar(auto ref T item)
    {
    }
}

void main()
{
    bar!(int) f;
}

also doesn't work.


Even the following doesn't compile:
void bar(T)(auto ref T item)
{
}

void main()
{
    int i;
    bar!(int)(i); // while bar(i); is OK
}
test.d(1): Error: auto can only be used for template function parameters
test.d(8): Error: template instance test.bar!(int) error instantiating

-- 
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