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: nob...@puremagic.com
        ReportedBy: bitwo...@qq.com


--- Comment #0 from Heromyth <bitwo...@qq.com> 2011-07-26 19:52:29 PDT ---
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: -------

Reply via email to