How would a specialize a parameterized class to only allow integral
parameters (i.e., anything that would respond true to
static if (is (T : long) )
(I'd have said static if (is (T : cent) ) or static if (is (T :
ucent) ), but those are still marked reserved for future use.)
I do want to
On Saturday, September 24, 2011 14:16:12 Charles Hixson wrote:
How would a specialize a parameterized class to only allow integral
parameters (i.e., anything that would respond true to
static if (is (T : long) )
(I'd have said static if (is (T : cent) ) or static if (is (T :
ucent) ), but
On 09/24/2011 02:33 PM, Jonathan M Davis wrote:
On Saturday, September 24, 2011 14:16:12 Charles Hixson wrote:
How would a specialize a parameterized class to only allow integral
parameters (i.e., anything that would respond true to
static if (is (T : long) )
(I'd have said static if (is (T :
On Saturday, September 24, 2011 16:14:48 Charles Hixson wrote:
On 09/24/2011 02:33 PM, Jonathan M Davis wrote:
On Saturday, September 24, 2011 14:16:12 Charles Hixson wrote:
How would a specialize a parameterized class to only allow integral
parameters (i.e., anything that would respond
On 09/24/2011 04:31 PM, Jonathan M Davis wrote:
On Saturday, September 24, 2011 16:14:48 Charles Hixson wrote:
On 09/24/2011 02:33 PM, Jonathan M Davis wrote:
On Saturday, September 24, 2011 14:16:12 Charles Hixson wrote:
How would a specialize a parameterized class to only allow integral
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
I spoke too soon.
class AA(Key, Data) if (isNumeric (Key) )
didn't work with a larger case,
s$ dmd aa.d
/usr/include/d/dmd/phobos/std/traits.d(2576): Error: template
std.traits.isNumeric(T) is not a function template
aa.d(200): Error: template std.traits.isNumeric(T) cannot deduce
On Saturday, September 24, 2011 17:41:52 Charles Hixson wrote:
I spoke too soon.
class AA(Key, Data) if (isNumeric (Key) )
didn't work with a larger case,
isNumeric!Key
std.straits.isNumeric is an eponymous template, _not_ a function. I believe
that everything in std.traits is an
On 09/24/2011 05:49 PM, Jonathan M Davis wrote:
On Saturday, September 24, 2011 17:41:52 Charles Hixson wrote:
I spoke too soon.
class AA(Key, Data) if (isNumeric (Key) )
didn't work with a larger case,
isNumeric!Key
std.straits.isNumeric is an eponymous template, _not_ a