Boost logo

Boost :

Subject: Re: [boost] [xint] Third release is ready, requesting preliminary review
From: Scott McMurray (me22.ca+boost_at_[hidden])
Date: 2010-05-03 19:00:39


On 3 May 2010 14:04, Chad Nelson <chad.thecomfychair_at_[hidden]> wrote:
>
> if (numeric_limits<T>::is_bounded) {
>    // do something using max() and min()
> }
>
> That wouldn't even compile if definitions of max and min weren't
> provided, even though it's perfectly legal and useful.
>

It will also give compiler warnings in certain compilers about
branching on a constant.

Generally the "correct" way is to only compile the max- or min-using
code if is_bounded is true, by enable_if, specialization, or some
other mechanism.


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