|
Boost : |
Subject: Re: [boost] [config] polygon library long long, long double portability
From: John Maddock (john_at_[hidden])
Date: 2009-06-26 04:16:28
>I use long long and long double in the configuration of my integer
>arithmetic traits. I'd like to guard those usages with boost macros to
>allow the code to compile on platforms that don't support long long and
>long double (replace with long and double respectively) but I can only find
>a BOOST_HAS_LONG_LONG macro (which is apparently not documented) and not a
>corresponding BOOST_HAS_LONG_DOUBLE. Is there some other macro I can use
>to detect BOOST_HAS_LONG_DOUBLE or a typedef I can use that is already set
>to long double if available and double otherwise?
~~
BOOST_HAS_LONG_LONG has been deprecated in favor of BOOST_NO_LONG_LONG now
that long long is actually part of the next standard:
http://www.boost.org/doc/libs/1_39_0/libs/config/doc/html/boost_config/boost_macro_reference.html#boost_config.boost_macro_reference.macros_that_describe_c__0x_features_not_supported
There's no BOOST_NO_LONG_DOUBLE because as far as I know there are no
compilers that don't support long double as a distinct type. However, there
are platforms/compilers that have either none or broken std lib support for
the long double math functions. Boost.Math has it's own config macro for
that, but it's rather specific to the list of functions used by that
library. So... how are you using long double?
Regards, John.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk