Template Usage with Eponymous Trick
ShadoLight
ettienne.gilbert at gmail.com
Sun Feb 2 17:51:38 UTC 2020
On Sunday, 2 February 2020 at 16:23:42 UTC, Paul Backus wrote:
[..]
>
> No, it would still be ambiguous:
>
> struct S(T) {}
>
> alias a = S!(int);
>
> // Should this assertion pass or fail?
> static assert(is(a));
Sorry, I don't get it. AFAICS 'is(a)' should return true (since a
is an alias for a full type here) - and braces being compulsory
or optional does not affect this.
AFAICS:
struct S(T) {}
alias a = S!(int);
alias b = S;
// Should this assertion pass or fail?
static assert(is(a)); //PASS
static assert(is(b)); //FAIL
But I don't see how braces will affect this. Can you explain?
More information about the Digitalmars-d-learn
mailing list