Can string mixing be split into several parts?

I have a mixin like this:

    mixin("struct " ~ name ~ " {\n" ~
          "  struct Regular {\n" ~
          "    // ..." ~
          "  }\n" ~
          "  struct WithDefaults {\n" ~
          "    // ..." ~
          "  }\n" ~
          '}');

I would like to split it into several mixins (preferably using regular non-string mixins).

Are things like this possible?

Also, what is the most proper thing to check that `name` is a proper identified (not say !@#)?

Reply via email to