mirror of
https://github.com/fastfloat/fast_float.git
synced 2026-01-01 03:12:18 +08:00
use #if defined __has_include properly
This commit is contained in:
parent
b17eafd06f
commit
e5d5e576a6
@ -7,11 +7,13 @@
|
||||
#include <cstring>
|
||||
#include <iterator>
|
||||
|
||||
#if defined(__has_include) && __has_include(<version>)
|
||||
#include <version>
|
||||
#if defined(__cpp_lib_bit_cast)
|
||||
#include <bit>
|
||||
#endif
|
||||
#if defined __has_include
|
||||
#if __has_include(<version>)
|
||||
#include <version>
|
||||
#if defined(__cpp_lib_bit_cast)
|
||||
#include <bit>
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "float_common.h"
|
||||
|
||||
@ -4,13 +4,17 @@
|
||||
|
||||
#include <system_error>
|
||||
|
||||
#if !defined(CXX20_CONSTEXPR) && defined(__has_include) && __has_include(<version>)
|
||||
#include <version>
|
||||
#if defined(__cpp_lib_bit_cast)
|
||||
#define CXX20_CONSTEXPR constexpr
|
||||
#else
|
||||
#define CXX20_CONSTEXPR
|
||||
#endif
|
||||
#if !defined(CXX20_CONSTEXPR)
|
||||
#define CXX20_CONSTEXPR
|
||||
#if defined __has_include
|
||||
#if __has_include(<version>)
|
||||
#include <version>
|
||||
#if defined(__cpp_lib_bit_cast)
|
||||
#undef CXX20_CONSTEXPR
|
||||
#define CXX20_CONSTEXPR constexpr
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
namespace fast_float {
|
||||
|
||||
@ -73,13 +73,17 @@
|
||||
#define fastfloat_really_inline inline __attribute__((always_inline))
|
||||
#endif
|
||||
|
||||
#if !defined(CXX20_CONSTEXPR) && defined(__has_include) && __has_include(<version>)
|
||||
#include <version>
|
||||
#if defined(__cpp_lib_bit_cast)
|
||||
#define CXX20_CONSTEXPR constexpr
|
||||
#else
|
||||
#define CXX20_CONSTEXPR
|
||||
#endif
|
||||
#if !defined(CXX20_CONSTEXPR)
|
||||
#define CXX20_CONSTEXPR
|
||||
#if defined __has_include
|
||||
#if __has_include(<version>)
|
||||
#include <version>
|
||||
#if defined(__cpp_lib_bit_cast)
|
||||
#undef CXX20_CONSTEXPR
|
||||
#define CXX20_CONSTEXPR constexpr
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
namespace fast_float {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user