On Wednesday, 21 February 2018 at 22:22:55 UTC, Meta wrote:
(I'm not sure if the available compiler implementations
actually enforce this)
Yes it does, example
```
enum s = q{€};
```
gives: `Error: character 0x20ac is not a valid token`
On Wednesday, 21 February 2018 at 22:22:55 UTC, Meta wrote:
Mixins have to be full declarations.
They need to be full declarations, full statements, or full
expressions, depending on the context where they appear.
string s = mixin("teste");
so that is a full expression and thus legal.
On Wednesday, 21 February 2018 at 22:11:04 UTC, Jean-Louis Leroy
wrote:
Here's what I am trying to do:
mixin template MakeFun(string ID, int X)
{
int mixin(ID)() { return X; }
}
mixin MakeFun!("one", 1); // int one() { return 1; }
Alas I get:
makefunc.d(3): Error: no identifier for declarato
Here's what I am trying to do:
mixin template MakeFun(string ID, int X)
{
int mixin(ID)() { return X; }
}
mixin MakeFun!("one", 1); // int one() { return 1; }
Alas I get:
makefunc.d(3): Error: no identifier for declarator `int`
makefunc.d(3): Error: found `{` when expecting `;`
makefunc.d(3):