How do I make a class whose interface matches double, but whose templated types do not dynamic cast to double?
The reason is that I have a run-time type system, and I want to be able to have a type that works just like double:
template<int min_value, int max_value>
class BoundedDouble: public double {};
And then use template specialization to get run-time information about that type:
template<typename T>
class Type { etc. }
template<int min_value, int max_value>
class Type<BoundedDouble<min_value, max_value>> { int min() const { return min_value; } etc. }
But, you can't inherit from double...