Boost logo

Boost :

Subject: Re: [boost] [review][constrained_value] ReviewofConstrainedValueLibrary begins today
From: Chris (indy271828_at_[hidden])
Date: 2008-12-07 18:54:47


Robert Kawulak wrote:
> I would like DEBUG sorted out though. Would I
>> typedef all the bounded types? I am not sure, I would rather have an
>> option to disable it using a macro as well.
>>
>
> You mean the possibility to turn all constrained objects into unconstrained by
> defining one macro? I initially considered this, but I rejected the idea because
> you may want to turn some checks off while leaving some of them on in one
> program (note, that constrained values are useful not only for debugging).
>
I understand.
 
Quick question, if I made a NullErrorPolicy, and had compiler
optimization on. Shouldn't the compiler remove all bounded checks?
(empty) There would be no need for me to worry about optimization and
slowness.

This would be probably be the proper way rather than myint types;

#ifdef MYDEBUG
typedef NullErrorPolicy Policy;
#else
typedef throw_exception
<http://student.agh.edu.pl/%7Ekawulak/constrained_value/reference/structboost_1_1constrained__value_1_1throw__exception.html><my_exception>
Policy;
#endif

Chris


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