#8941 closed Bugs (duplicate)
Detection of availability of 128-bit integers should be left on Boost.Config
Reported by: | Owned by: | Antony Polukhin | |
---|---|---|---|
Milestone: | Component: | lexical_cast | |
Version: | Boost 1.54.0 | Severity: | Problem |
Keywords: | Cc: |
Description
The following code in lexical_cast.hpp appears wrong:
#if (defined(BOOST_LCAST_HAS_INT128) && !defined(__GNUC__)) || GCC_VERSION > 40700 #define BOOST_LCAST_HAS_INT128 #endif
I'm uncertain whether BOOST_LCAST_HAS_INT128 serves some purpose such as per-library configuration. It seems to me it would be best to simply defer this logic to config.hpp, drop this piece of code, and later on dispatch on BOOST_HAS_INT128. I'm attaching a patch to this effect.
Note that this logic currently breaks on i386, where GCC doesn't support 128-bit data types even though it otherwise satisfies the above condition.
If you wish to have this configured specifically for lexical cast, I can work in some logic that overrides BOOST_HAS_INT128 in favor of whatever BOOST_LCAST_HAS_INT128 setting came from the "outside" (if any).
Attachments (1)
Change History (4)
by , 9 years ago
Attachment: | boost-1.54.0-lexical_cast-int128.patch added |
---|
comment:2 by , 9 years ago
Milestone: | To Be Determined → Boost 1.56.0 |
---|---|
Resolution: | → duplicate |
Status: | new → closed |
comment:3 by , 9 years ago
Milestone: | Boost 1.56.0 |
---|
A fix.