|
Boost : |
From: Peder Holt (peder.holt_at_[hidden])
Date: 2005-10-13 01:57:21
On 10/3/05, Robert Kawulak <kawulak_at_[hidden]> wrote:
> Hi,
>
> The new, almost finished constrained_types library is here:
> http://student.agh.edu.pl/~kawulak/ct.zip. It's later than I promised, but
> recently I didn't have much time and I just wanted to polish it before
> publishing. I successfully compiled it with the following compilers:
<snip>
It would perhaps be a good idea to use mpl::int_<> instead of
give_number<> to specify a constraint limit.
You can also use mpl::math::double_c<> (available from the file vault:
Template Metaprogramming/mpl_math.zip)
Example:
ct::bounded< double, boost::mpl::math::string_to_double<0,'.',1>,
boost::mpl::int_<1> >::type d_0_1__1;
To extract a runtime equivalent:
boost::mpl::runtime_value<MinValGen::value_type>(MinValGen());
Regards,
Peder
>
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk