August 24, 2014 how to tell if a thing is a template | ||||
|---|---|---|---|---|
| ||||
Can't think off the top of my head how you do this
template IsTemplate(alias t) {
??
}
static assert(IsTemplate!IsTemplate)
| ||||
August 25, 2014 Re: how to tell if a thing is a template | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Ellery Newcomer | On Sunday, 24 August 2014 at 00:41:36 UTC, Ellery Newcomer wrote:
> Can't think off the top of my head how you do this
>
> template IsTemplate(alias t) {
> ??
> }
>
> static assert(IsTemplate!IsTemplate)
__traits(compiles, is(t!X, X...))
should do it, or something similar.
| |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply