Boost logo

Boost :

From: christopher diggins (cdiggins_at_[hidden])
Date: 2004-05-17 10:53:49


----- Original Message -----
From: "Jeff Garland" <jeff_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Monday, May 17, 2004 11:29 AM
Subject: Re: [boost] Ranged type mini-library submission
[snip]

> > 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
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


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk