Re: allSatisfy could use some constraints

2011-09-22 Thread Jonathan M Davis
On Thursday, September 22, 2011 15:36 Andrej Mitrovic wrote: 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

Re: allSatisfy could use some constraints

2011-09-22 Thread Jonathan M Davis
On Thursday, September 22, 2011 16:45 Jonathan M Davis wrote: On Thursday, September 22, 2011 15:36 Andrej Mitrovic wrote: import std.string; import std.traits; import std.typetuple; void main() { if (allSatisfy!(isNumeric, int, short)) { } }

Re: allSatisfy could use some constraints

2011-09-22 Thread Andrej Mitrovic
On 9/23/11, Jonathan M Davis jmdavisp...@gmx.com wrote: Though given that allSatisfy!(isNumeric, int, short) will work with std.traits.isNumeric and not std.string.isNumeric, I suspect that a template constraint could be added which would fix the problem simply by checking whether the

Re: allSatisfy could use some constraints

2011-09-22 Thread Jonathan M Davis
On Thursday, September 22, 2011 17:03 Andrej Mitrovic wrote: On 9/23/11, Jonathan M Davis jmdavisp...@gmx.com wrote: Though given that allSatisfy!(isNumeric, int, short) will work with std.traits.isNumeric and not std.string.isNumeric, I suspect that a template constraint could be added