Boost logo

Boost Users :

Subject: Re: [Boost-users] [mpl][type_traits] Getting the minimum and maximum value for a buit-in type at compile time
From: Edward Diener (eldiener_at_[hidden])
Date: 2009-12-18 18:09:19

Rhys Ulerich wrote:
>> I would have thought that there must be a way to get the minimum and maximum
>> value for a C++ built-in type but my search through mpl and type_traits
>> yields nothing and numeric_limits requires a run-time function call.
> integer_traits is available
> (
> and provides const_min and const_max, but it sounds like you're after
> non-integer traits information. I don't know how to get compile-time
> constants for floating point types.

That's what I needed. Thanks !

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at