Help!

David Nadlinger see at klickverbot.at
Mon Nov 26 11:15:30 PST 2012


On Monday, 26 November 2012 at 17:18:28 UTC, Manu wrote:
> the supplementary question is, how do I then
> discover if bar[0] is a symbol or not? I can't see any traits 
> to test for
> builtin types...

Depends on your definition of symbol, but if you mean symbol as 
in "an alias parameter accepts it", the obvious solution is:

---
template isSymbol(alias S) {
   enum isSymbol = true;
}

template isSymbol(S) {
   enum isSymbol = false;
}
---

David


More information about the Digitalmars-d mailing list