How to implement `isTemplate` traits?

drug drug2004 at bk.ru
Wed Oct 4 09:32:31 UTC 2017


I need to separate templates:
```
foreach(member; __traits(allMembers, V))
{
	static if (__traits(compiles, { auto _val = &__traits(getMember, value, 
member); })
	{
		// a template needs to be instantiated to be addressable, so it works, 
but I think it's dirty hack instead of dry and clean way...
	}
}
```
May be phobos has such traits somewhere?


More information about the Digitalmars-d-learn mailing list