[Issue 11074] New: Template value parameter defaults behave differently for IFTI and normal instantations
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Sep 20 08:33:22 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11074
Summary: Template value parameter defaults behave differently
for IFTI and normal instantations
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: major
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: simen.kjaras at gmail.com
--- Comment #0 from Simen Kjaeraas <simen.kjaras at gmail.com> 2013-09-20 08:33:21 PDT ---
void bar(int line = __LINE__)() {
pragma(msg, line);
}
void main() {
bar!()();
bar();
}
The two calls to bar should be equivalent, right? They're not. In the case of
explicit instantiation, __LINE__ is evaluated to be 1, while with IFTI, it is
7.
--
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