Summary: Bad example about Mixin
           Product: D
           Version: D2
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: websites

--- Comment #0 from Heromyth <> 2011-07-26 19:52:29 PDT ---
There is an example in, like

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

By the way, it seems that the mixin can only accept the type of const char[].
Should it take string type?

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to