disable <charconv> on emscripten (fixes #71)

This commit is contained in:
Mark Gillard 2020-11-26 17:28:28 +02:00
parent 022a5b3166
commit d95ff4c04f
2 changed files with 12 additions and 20 deletions

View File

@ -100,11 +100,6 @@
#define TOML_LIKELY(...) (__builtin_expect(!!(__VA_ARGS__), 1) )
#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
#endif // clang
@ -196,11 +191,6 @@
#define TOML_LIKELY(...) (__builtin_expect(!!(__VA_ARGS__), 1) )
#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
//#====================================================================================================================
@ -328,6 +318,12 @@ is no longer necessary.
#define TOML_MAY_THROW noexcept
#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
#define TOML_INT_CHARCONV 1
#endif

View File

@ -134,11 +134,6 @@
#define TOML_LIKELY(...) (__builtin_expect(!!(__VA_ARGS__), 1) )
#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
#endif // clang
@ -218,11 +213,6 @@
#define TOML_LIKELY(...) (__builtin_expect(!!(__VA_ARGS__), 1) )
#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
#ifdef TOML_CONFIG_HEADER
@ -342,6 +332,12 @@ is no longer necessary.
#define TOML_MAY_THROW noexcept
#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
#define TOML_INT_CHARCONV 1
#endif