https://d.puremagic.com/issues/show_bug.cgi?id=12426
Summary: Spurious "auto can only be used for template function
parameters" for overloaded templated functions
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: diagnostic, rejects-valid
Severity: major
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Vladimir Panteleev <[email protected]> 2014-03-20
19:40:17 EET ---
///////// test.d ////////
void fun(T)(auto ref T t)
if (false)
{
}
void fun(T)()
{
}
alias fun!int funint;
/////////////////////////
Compiler complains:
test.d(1): Error: auto can only be used for template function parameters
Not only is this error spurious (the constraint will never pass), but the
compiler does not indicate the location of the instantiation.
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------