Boost logo

Boost :

Subject: Re: [boost] [rational] Which way should std::numeric_limits::min go?
From: Daryle Walker (darylew_at_[hidden])
Date: 2013-08-23 04:26:32


> From: john_at_[hidden]
> Date: Thu, 22 Aug 2013 08:18:06 +0100
>
> I would treat it as a variant of the integer types, and set min() to the
> most negative value, and max() to the most positive value. I suppose
> denorm_min could be the smallest positive value, but I don't think there's
> any prior art for that.

The only built-in types that define denorm_min use that function to define min,
that's why I was thinking of using denorm_min for min too (instead of lowest, which
the built-in integers use).

I'm going to use some helper templates, since I'll have to use the component type's
numeric_limits, and I'll have to specialize on signed vs. unsigned, bounded vs.
unbounded, etc.

Daryle W.


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