
Hi, In reply to Christopher Diggins post:
My version is here: http://www.cdiggins.com/constrained_value.hpp and some basic tests are at http://www.cdiggins.com/cv_test.cpp . My approach was to keep the policy as simple as possible and that is one which provides only the entire assignment operation (this entails the contraints checking, and exceptional behaviour), rather than breaking it down into several steps.
Thanks for your reply! My goal was different - to make the bounded classes and their policies as efficient and reusable as possible, even though your design is a bit similar, but simplier. The complexity of my design was the reason to create template aliases for the most common uses of basic_bounded template - this is the purpose of bounded.hpp file. Best regards, Robert