Re: __traits(compiles) and template instantiation

2016-04-08 Thread jmh530 via Digitalmars-d-learn
It looks like the bug has already been reported. There are a few associated with __traits(compiles), but this one seems most relevant: https://issues.dlang.org/show_bug.cgi?id=3448 It also suggests that this is relevant: https://issues.dlang.org/show_bug.cgi?id=965

Re: __traits(compiles) and template instantiation

2016-04-07 Thread jkpl via Digitalmars-d-learn
On Thursday, 7 April 2016 at 21:36:37 UTC, Alex Parrill wrote: On Thursday, 7 April 2016 at 20:31:12 UTC, jmh530 wrote: I've been playing around with __traits and I find myself confused on one aspect. In the code below, I was testing whether some templates would compile given types. For the

Re: __traits(compiles) and template instantiation

2016-04-07 Thread Alex Parrill via Digitalmars-d-learn
On Thursday, 7 April 2016 at 20:31:12 UTC, jmh530 wrote: I've been playing around with __traits and I find myself confused on one aspect. In the code below, I was testing whether some templates would compile given types. For the most part it works as I would expect. I think I get why the

__traits(compiles) and template instantiation

2016-04-07 Thread jmh530 via Digitalmars-d-learn
I've been playing around with __traits and I find myself confused on one aspect. In the code below, I was testing whether some templates would compile given types. For the most part it works as I would expect. I think I get why the third one works with foo!(int). My guess is that it assumed