Nordlöw:

because saturated is an instantiator function. Shouldn't it?

I still don't understand how you can design a good enough ranged integer without something like "enum preconditions". Functions run at run-time, so currently in D you can't enforce the correctness of literals for not-enum values at compile time. So in general the mutable ranged integer can only give the error at run-time, and this is not acceptable. I am missing something?

Bye,
bearophile

Reply via email to