
Hi Jesse,
In practice, you are changing the bounds here prior to creating instances of an item. It is purely a question of being able to dynamically create bounds for a type and then query them later...
OK, now it makes a bit more sense. Moreover, I believe it is possible (though maybe not trivial) to implement something similar with the current library.
Otherwise if std::max was written to take two different types with compatible comparison operators, that this could work fine?
And if the constrained_value<double> had an implicit conversion to double,
You may have a look at http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2199.html -- it tries to overcome the problem for min/max, but still the problem remains for any template function with arguments of the same type. then we would have no problem? You mean, with std::max? We would have exactly the same problem. Best regards, Robert