[Issue 2204] New: const IFTI fails sometimes with more than one parameter
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jul 8 11:23:35 PDT 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2204
Summary: const IFTI fails sometimes with more than one parameter
Product: D
Version: 2.015
Platform: PC
OS/Version: Linux
Status: NEW
Keywords: rejects-valid
Severity: major
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: schveiguy at yahoo.com
Given the code
const(T)[] f(T)(const(T)[] v1, const(T)[] v2){return v1;}
const(T)[] f2(T)(const(T)[] v1){return v1;}
void main()
{
char[] a, b;
const(char)[] a2, b2;
f(a, b); // OK
f(a2, b2); // Error (see below)
f2(a); // OK
f2(a2); // OK
}
the error that is encountered on f(a2, b2) is:
testconst.d(9): template testconst.f(T) does not match any function template
declaration
testconst.d(9): template testconst.f(T) cannot deduce template function from
argument types !()(const(char)[],const(char)[])
This also appears to fail on 2.008 and 2.012
--
More information about the Digitalmars-d-bugs
mailing list