class specialization for integral types
Jonathan M Davis
jmdavisProg at gmx.com
Sat Sep 24 17:34:42 PDT 2011
On Saturday, September 24, 2011 17:30:36 Charles Hixson wrote:
> OK, here's the problem:
> s$ dmd -unittest test2.d
> /usr/include/d/dmd/phobos/std/traits.d(2576): Error: template
> std.traits.isNumeric(T) is not a function template
> test2.d(8): Error: template std.traits.isNumeric(T) cannot deduce
> template function from argument types !()(int)
> test2.d(192): Error: template instance Node!(int,string) does not match
> template declaration Node(Key,Data) if (isNumeric(Key))
> test2.d(192): Error: Node!(int,string) is used as a type
>
> The interesting thing is, that doesn't happen unless I compile with
> unittest. I moved the offending statement:
> auto tNode = new Node!(int, string)(null);
> into main, compiled without -unittest, and the thing compiled. (I
> haven't tested it yet, so it might not work, but it's now looking that
> that's where the problem occurs. So I *can* use isNumeric.
I'm afraid that I'd need actual code to determine what the problem is. Without
an example which shows the problem, I can't really figure out what's really
happening.
- Jonathan M Davis
More information about the Digitalmars-d-learn
mailing list