mirror of
https://github.com/fastfloat/fast_float.git
synced 2025-12-07 17:26:51 +08:00
Fix space_lut so it's accepted by MSVC and clang
This commit is contained in:
parent
a6991ea44f
commit
0e4b873d81
@ -462,11 +462,7 @@ fastfloat_really_inline void to_float(bool negative, adjusted_mantissa am, T &va
|
||||
#if FASTFLOAT_SKIP_WHITE_SPACE // disabled by default
|
||||
template <typename = void>
|
||||
struct space_lut {
|
||||
static const bool value[];
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
constexpr bool space_lut<T>::value[] = {
|
||||
static constexpr bool value[] = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
@ -478,6 +474,10 @@ constexpr bool space_lut<T>::value[] = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
constexpr bool space_lut<T>::value[];
|
||||
|
||||
inline constexpr bool is_space(uint8_t c) { return space_lut<>::value[c]; }
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user