Boost logo

Boost :

From: christopher diggins (cdiggins_at_[hidden])
Date: 2004-05-17 09:32:33


----- Original Message -----
From: "Robert Bell" <belvis_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Sunday, May 16, 2004 6:53 PM
Subject: [boost] Re: Ranged type mini-library submission

> christopher diggins wrote:
>
> [ ... ]
>
> > template
> > <
> > class constraints_policy,
> > class error_policy = default_error_policy,
> > bool implicit_conversion_policy = true
> > >
>
> [...]
>
> I just noticed that the implicit_conversion_policy policy argument
> controls whether a raw value can be assigned to a constrained_value, but
> has nothing to say about whether a constrained_value can be constructed
> from a raw value or whether a constrained value can be converted to a
> raw value.
>
> Bob

This was intentional. I am of the point of view that implicit widening
conversions are not something that needs to be switched on/off. The reason I
included the policy was so that I could implement constrained values that
would not have implicit narrowing conversions which is a source of many
errors in C++ code.

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