Boost logo

Boost :

Subject: [boost] Adding cstdfloat.hpp - wheres the best place?
From: John Maddock (john_at_[hidden])
Date: 2014-01-14 14:26:57


Folks,

Christopher Kormanyos has coded up a version of cstdfloat.hpp for
Boost.Math:
https://github.com/boostorg/math/blob/bernoulli-tgamma/include/boost/math/tools/cstdfloat.hpp

This header is proposed for C++14, and the C language folks are doing
something similar: it provides similar functionality for floating point
types that <cstdint> does for integer types:

Typedefs:

floatN_t
float_leastN_t
float_fastN_t
floatmax_t

Macros:

BOOST_FLOATN_C(x) // floating point constant of width N.
BOOST_FLOAT_N_MIN
BOOST_FLOAT_N_MAX
BOOST_FLOAT_FASTN_C(x)
BOOST_FLOAT_LEASTN_MIN
BOOST_FLOAT_FASTN_MIN
BOOST_FLOAT_LEASTN_MAX
BOOST_FLOAT_FASTN_MAX
BOOST_FLOATMAX_C(x)
BOOST_FLOATMAX_MIN
BOOST_FLOATMAX_MAX

Where N is one of 16, 32, 64, 128 and correspond to the IEEE half, single,
double and quad types respectively.

So... the question is where to best place this?

Does anyone object if it goes under boost/cstdfloat.hpp to sit alongside
cstdint.hpp?

Where should it best be documented and tested? We can obviously add it
under the Math lib, but is there a better more "discoverable" place?
cstdint.hpp is under integer BTW so it can't go there ;-)

Thanks in advance, John.


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