mirror of
https://github.com/marzer/tomlplusplus.git
synced 2025-02-25 06:39:58 +00:00
disable <charconv> on emscripten (fixes #71)
This commit is contained in:
parent
022a5b3166
commit
d95ff4c04f
@ -100,11 +100,6 @@
|
|||||||
#define TOML_LIKELY(...) (__builtin_expect(!!(__VA_ARGS__), 1) )
|
#define TOML_LIKELY(...) (__builtin_expect(!!(__VA_ARGS__), 1) )
|
||||||
#define TOML_UNLIKELY(...) (__builtin_expect(!!(__VA_ARGS__), 0) )
|
#define TOML_UNLIKELY(...) (__builtin_expect(!!(__VA_ARGS__), 0) )
|
||||||
|
|
||||||
//floating-point from_chars and to_chars are not implemented in any version of clang as of 1/1/2020
|
|
||||||
#ifndef TOML_FLOAT_CHARCONV
|
|
||||||
#define TOML_FLOAT_CHARCONV 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define TOML_SIMPLE_STATIC_ASSERT_MESSAGES 1
|
#define TOML_SIMPLE_STATIC_ASSERT_MESSAGES 1
|
||||||
|
|
||||||
#endif // clang
|
#endif // clang
|
||||||
@ -196,11 +191,6 @@
|
|||||||
#define TOML_LIKELY(...) (__builtin_expect(!!(__VA_ARGS__), 1) )
|
#define TOML_LIKELY(...) (__builtin_expect(!!(__VA_ARGS__), 1) )
|
||||||
#define TOML_UNLIKELY(...) (__builtin_expect(!!(__VA_ARGS__), 0) )
|
#define TOML_UNLIKELY(...) (__builtin_expect(!!(__VA_ARGS__), 0) )
|
||||||
|
|
||||||
// floating-point from_chars and to_chars are not implemented in any version of gcc as of 1/1/2020
|
|
||||||
#ifndef TOML_FLOAT_CHARCONV
|
|
||||||
#define TOML_FLOAT_CHARCONV 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//#====================================================================================================================
|
//#====================================================================================================================
|
||||||
@ -328,6 +318,12 @@ is no longer necessary.
|
|||||||
#define TOML_MAY_THROW noexcept
|
#define TOML_MAY_THROW noexcept
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if TOML_GCC || TOML_CLANG // fp charconv not in supported gcc or clang as of 26/11/2020
|
||||||
|
#define TOML_FLOAT_CHARCONV 0
|
||||||
|
#endif
|
||||||
|
#if defined(__EMSCRIPTEN__) // causes link errors on emscripten
|
||||||
|
#define TOML_INT_CHARCONV 0
|
||||||
|
#endif
|
||||||
#ifndef TOML_INT_CHARCONV
|
#ifndef TOML_INT_CHARCONV
|
||||||
#define TOML_INT_CHARCONV 1
|
#define TOML_INT_CHARCONV 1
|
||||||
#endif
|
#endif
|
||||||
|
16
toml.hpp
16
toml.hpp
@ -134,11 +134,6 @@
|
|||||||
#define TOML_LIKELY(...) (__builtin_expect(!!(__VA_ARGS__), 1) )
|
#define TOML_LIKELY(...) (__builtin_expect(!!(__VA_ARGS__), 1) )
|
||||||
#define TOML_UNLIKELY(...) (__builtin_expect(!!(__VA_ARGS__), 0) )
|
#define TOML_UNLIKELY(...) (__builtin_expect(!!(__VA_ARGS__), 0) )
|
||||||
|
|
||||||
//floating-point from_chars and to_chars are not implemented in any version of clang as of 1/1/2020
|
|
||||||
#ifndef TOML_FLOAT_CHARCONV
|
|
||||||
#define TOML_FLOAT_CHARCONV 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define TOML_SIMPLE_STATIC_ASSERT_MESSAGES 1
|
#define TOML_SIMPLE_STATIC_ASSERT_MESSAGES 1
|
||||||
|
|
||||||
#endif // clang
|
#endif // clang
|
||||||
@ -218,11 +213,6 @@
|
|||||||
#define TOML_LIKELY(...) (__builtin_expect(!!(__VA_ARGS__), 1) )
|
#define TOML_LIKELY(...) (__builtin_expect(!!(__VA_ARGS__), 1) )
|
||||||
#define TOML_UNLIKELY(...) (__builtin_expect(!!(__VA_ARGS__), 0) )
|
#define TOML_UNLIKELY(...) (__builtin_expect(!!(__VA_ARGS__), 0) )
|
||||||
|
|
||||||
// floating-point from_chars and to_chars are not implemented in any version of gcc as of 1/1/2020
|
|
||||||
#ifndef TOML_FLOAT_CHARCONV
|
|
||||||
#define TOML_FLOAT_CHARCONV 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef TOML_CONFIG_HEADER
|
#ifdef TOML_CONFIG_HEADER
|
||||||
@ -342,6 +332,12 @@ is no longer necessary.
|
|||||||
#define TOML_MAY_THROW noexcept
|
#define TOML_MAY_THROW noexcept
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if TOML_GCC || TOML_CLANG // fp charconv not in supported gcc or clang as of 26/11/2020
|
||||||
|
#define TOML_FLOAT_CHARCONV 0
|
||||||
|
#endif
|
||||||
|
#if defined(__EMSCRIPTEN__) // causes link errors on emscripten
|
||||||
|
#define TOML_INT_CHARCONV 0
|
||||||
|
#endif
|
||||||
#ifndef TOML_INT_CHARCONV
|
#ifndef TOML_INT_CHARCONV
|
||||||
#define TOML_INT_CHARCONV 1
|
#define TOML_INT_CHARCONV 1
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user