Boost logo

Boost :

Subject: Re: [boost] [review][constrained_value] ReviewofConstrainedValueLibrary begins today
From: Robert Kawulak (robert.kawulak_at_[hidden])
Date: 2008-12-07 19:41:14


> From: Chris
> #ifdef MYDEBUG
> typedef NullErrorPolicy Policy;
> #else
> typedef throw_exception<my_exception> Policy;
> #endif
>
> struct A {
>
> bounded_int<int, 0, 100, Policy> a;
> bounded_int<int, 50, 100, Policy> b;
> bounded_int<int, 2, 3, Policy> c;
>
> };
>
>
> It would be the same for compiler optimization as
> unconstrained, wouldn't it? It should remove any useless code.

In theory yes, but in practice this is a difficult optimisation task -- see
http://article.gmane.org/gmane.comp.lib.boost.devel/174845/ .


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