Error: unsupported char 0x03
Agustin
agustin.l.alvarez at hotmail.com
Tue Oct 22 08:03:27 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".
protected template GenMessageGetId(uint id) {
immutable string GenMessageGetId
= "public immutable(int) getId() const { \nreturn" ~ id ~
";
\n}";
}
More information about the Digitalmars-d-learn
mailing list