
3 Dec
2008
3 Dec
'08
4:23 p.m.
Mathias Gaunard wrote:
I say it is up to the programmer to ensure valid values are provided. If the value is only known at runtime, there should be explicit checking in the code prior to assignment.
If the value must be checked beforehand, why bother using a constrained type at all? Where's the benefit if all assignments are already guaranteed to be valid by external tests? Might just as well use a test+POD combination. --> Mika Heiskanen