[Issue 12426] New: Spurious "auto can only be used for template function parameters" for overloaded templated functions
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Mar 20 10:40:18 PDT 2014
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: nobody at puremagic.com
ReportedBy: thecybershadow at gmail.com
--- Comment #0 from Vladimir Panteleev <thecybershadow at gmail.com> 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: -------
More information about the Digitalmars-d-bugs
mailing list