www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - allSatisfy could use some constraints

import std.string;
import std.traits;
import std.typetuple;

void main()
    if (allSatisfy!(isNumeric, int, short))

D:\DMD\dmd2\windows\bin\..\..\src\phobos\std\typetuple.d(576): Error:
template instance F is not a template declaration, it is a overloadset

This took a good while to figure out what went wrong. std.traits
defines isNumeric, but std.string defines it too. allSatisfy takes an
alias type parameter with no constraints, so maybe some constraints
could be added so it doesn't get instantiated with regular functions
but only template functions?
Sep 22 2011