
This leaves us with:
template< class constraints_policy, bool implicit_conversion_policy = true> class constrained_value { ... }
But I think you the 'min' and 'max' function requirement is now out of
----- Original Message ----- From: "Jeff Garland" <jeff@crystalclearsoftware.com> To: <boost@lists.boost.org> Sent: Monday, May 17, 2004 11:29 AM Subject: Re: [boost] Ranged type mini-library submission [snip] place
on the core template. If you have a constrained range, then it makes sense, but if I'm checking for 'divisible by 4' then I'll be perplexed as to why I have to provide min and max in my constraints_policy class. However, if you derive from the constraints_policy it can provide any interfaces it wants to the user.
You are completely correct about min and max. So I removed them. How about exposing the constraints_policy as a public typedef (I just posted a version which does this). This is perhaps a good compromise? There are just so many problems that can arise from parameterized inheritance, I would like to avoid it if there is an acceptable alternative. Christopher Diggins http://www.cdiggins.com http://www.heron-language.com