Boost logo

Boost :

Subject: Re: [boost] [xint] Third release is ready, requesting preliminary review
From: Scott McMurray ([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, gregod at, cpdaniel at, john at