
7 Mar
2007
7 Mar
'07
5:22 p.m.
On 3/7/07, james.jones@firstinvestors.com
Suppose I have a set of templates that have a common interface (each is a model of the same concept, to use that lingo). I'd like to extend std::numeric_limits to support this concept. I'm trying to find a way to use enable_if to do this, but I don't see how. Is this possible? Is there some other trick to doing this?
I don't think you can "extend" classes that already exist. Note, for example, that boost has integer_traits, and doesn't try to modify numeric_limits. Why do you want the concept to be in numeric_limits? Can you not simply use is_decimal_type?