mirror of
https://github.com/fastfloat/fast_float.git
synced 2026-06-15 00:16:11 +08:00
Merge pull request #392 from biojppm/fix/gcc9_compile_error
Fix compile error with gcc 9: use of [[unlikely]]
This commit is contained in:
commit
30868f8734
@ -207,7 +207,11 @@ using parse_options = parse_options_t<char>;
|
||||
// to a no-op elsewhere (e.g. pre-C++20 MSVC, which has no equivalent hint).
|
||||
#ifdef __has_cpp_attribute
|
||||
#if __has_cpp_attribute(unlikely) >= 201803L
|
||||
#define FASTFLOAT_USE_UNLIKELY_ATTR 1
|
||||
// g++-9 hits hits this branch, but then fails to compile
|
||||
// [[unlikely]]. This happens only with g++-9.
|
||||
#if !defined(__GNUC__) || (__GNUC__ != 9)
|
||||
#define FASTFLOAT_USE_UNLIKELY_ATTR
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user