Suppose I have a LimitedValue class which holds a value, and is parameterized on int types \'min\' and \'max\'. You\'d use it as a container for holding values which can on
At the moment, that is impossible in a portable manner due to the C++ rules on how methods (and by extension, constructors) are called even with constant arguments.
In the C++0x standard, you could have a const-expr that would allow such an error to be produced though.
(This is assuming you want it to throw an error only if the actual value is illegal. If the ranges do not match, you can achieve this)