Skip to content

Commit 4febcc5

Browse files
authored
Merge pull request #300 from boostorg/299
Fix check for long double as float on clang ppc64le
2 parents 78d2d26 + 4ff5282 commit 4febcc5

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

include/boost/charconv/detail/config.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,11 @@ static_assert((BOOST_CHARCONV_ENDIAN_BIG_BYTE || BOOST_CHARCONV_ENDIAN_LITTLE_BY
197197

198198
#define BOOST_CHARCONV_LDBL_IS_FLOAT128
199199
#define BOOST_CHARCONV_UNSUPPORTED_LONG_DOUBLE
200+
// This identity holds only on GCC. clang keeps long double and __float128 as distinct types
201+
// even when both are IEEE binary128, and does not expose __float128 without -mfloat128.
202+
#if defined(__GNUC__) && !defined(__clang__)
200203
static_assert(std::is_same<long double, __float128>::value, "__float128 should be an alias to long double. Please open an issue at: https://github.com/boostorg/charconv");
204+
#endif
201205

202206
#endif
203207

0 commit comments

Comments
 (0)