digitalmars.D.bugs - [Issue 6388] New: Bad example about Mixin
- d-bugmail puremagic.com (27/27) Jul 26 2011 http://d.puremagic.com/issues/show_bug.cgi?id=6388
- d-bugmail puremagic.com (12/12) Oct 25 2011 http://d.puremagic.com/issues/show_bug.cgi?id=6388
http://d.puremagic.com/issues/show_bug.cgi?id=6388
Summary: Bad example about Mixin
Product: D
Version: D2
Platform: Other
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: websites
AssignedTo: nobody puremagic.com
ReportedBy: bitworld qq.com
There is an example in http://www.digitalmars.com/d/2.0/mixin.html, like
belown:
template GenStruct(char[] Name, char[] M1)
{
const char[] GenStruct = "struct " ~ Name ~ "{ int " ~ M1 ~ "; }";
}
mixin(GenStruct!("Foo", "bar"));
It can be compiled when using in a demo. The char[] should be changed to
string.
By the way, it seems that the mixin can only accept the type of const char[].
Should it take string type?
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 26 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6388
Kasumi Hanazuki <k.hanazuki gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |k.hanazuki gmail.com
Resolution| |DUPLICATE
PDT ---
*** This issue has been marked as a duplicate of issue 1986 ***
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 25 2011








d-bugmail puremagic.com