[Issue 8145] New: void template instantiation?
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu May 24 14:55:35 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8145
Summary: void template instantiation?
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: websites
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2012-05-24 14:57:18 PDT ---
This compiles with no errors nor warnings (dmd 2.060alpha):
struct Foo(T) {}
Foo!void f;
void main() {}
While a C++ compiler as G++ 4.7 gives:
error: ‘void’ is not a valid type for a template constant parameter
On IRC someone has said this is a feature of D. If this feature is present in D
docs then I suggest to make such note a bit more evident and to explain a bit
how this feature is useful. I think this is useful for C++ programmers.
--
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