Error: unsupported char 0x03

John Colvin john.loughran.colvin at gmail.com
Tue Oct 22 08:06:09 PDT 2013


On Tuesday, 22 October 2013 at 15:01:20 UTC, Agustin wrote:
> Trying to use mixin, i get an unsupported char error.
>
> protected template GenMessageGetId(uint id) {
>     immutable string GenMessageGetId
>         = "public immutable(int) getId() const { \n" ~ id ~ "; 
> \n}";
> }
>
> public mixin template Packet(uint id, T...) {
>     ...
>
>     private static string buildPacket() {
>          ...
>
>          return GenMessageGetId!(id);
>     }
>
>     mixin (buildPacket());
> }
>
> class MyPacket : Message {
>     mixin Packet!(3, ...); -> Error: unsupported char 0x03
> }
>
> GenMessageGetId is generating "unsupported char 0x03".

do you perhaps want to!string(id) ???


More information about the Digitalmars-d-learn mailing list