On Wednesday, 17 August 2016 at 13:33:26 UTC, Steven
Schveighoffer wrote:
I think the OP's case is a bug. Please file.
Thanks, I've filed it. Just wanted to get a second opinion before
concluding that it's a bug.
On 8/17/16 9:23 AM, Lodovico Giaretta wrote:
On Wednesday, 17 August 2016 at 13:21:16 UTC, Cauterite wrote:
On Wednesday, 17 August 2016 at 13:18:06 UTC, Adam D. Ruppe wrote:
Best you can do is use them in an alias argument directly, but you
cannot use them in an enum argument.
I think you
On Wednesday, 17 August 2016 at 13:21:16 UTC, Cauterite wrote:
On Wednesday, 17 August 2016 at 13:18:06 UTC, Adam D. Ruppe
wrote:
Best you can do is use them in an alias argument directly, but
you cannot use them in an enum argument.
I think you missed the point; it works perfectly fine
On Wednesday, 17 August 2016 at 13:18:06 UTC, Adam D. Ruppe wrote:
Best you can do is use them in an alias argument directly, but
you cannot use them in an enum argument.
I think you missed the point; it works perfectly fine without
having this `({return 0;})()` in the template body (which,
On Wednesday, 17 August 2016 at 13:09:40 UTC, Cauterite wrote:
Just by having a random `({return 0;})()` in the template body,
suddenly the template rejects its arguments. I'm so confused,
is this a bug? Or am I missing something?
Function pointers and delegates are not valid compile time
// -- Example: --
template A(alias Arg) {
enum A = Arg;
enum Unrelated = ({return 0;})(); // this line prevent
compilation
};
void main() {
enum FnPtr =
enum _ = A!FnPtr;
};
void asdf() {};
// ( https://dpaste.dzfl.pl/79301f12e5fc )
Just by having a