On 26 November 2012 21:15, David Nadlinger <s...@klickverbot.at> wrote:

> 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
>

struct S {}
isSymbol!S <- why isn't this ambiguous? both templates match that equally,
why would it prefer the alias one?

Reply via email to