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