IRainman
681346fde1
Merge branch 'main' of https://github.com/fastfloat/fast_float into fastfloat-main
2025-03-12 17:00:35 +03:00
Daniel Lemire
c6732cd28b
lint
2025-03-10 09:02:38 -04:00
Daniel Lemire
b29208f93d
adding FASTFLOAT_IF_CONSTEXPR17
2025-03-09 17:10:55 -04:00
IRainman
63eb578d52
Add FASTFLOAT_HAS_BYTESWAP check.
...
Improve FASTFLOAT_CONSTEVAL20 usage for older standards.
2025-03-09 22:55:04 +03:00
Daniel Lemire
6f0049a2e7
lint
2025-03-09 15:14:52 -04:00
Daniel Lemire
95dedd0aed
turning json option into macro parameter
2025-03-09 15:13:43 -04:00
IRainman
c2daa8a614
Added FASTFLOAT_ASSUME for support attribute [[assume]] is declared in P1774
2025-03-09 03:41:27 +03:00
IRainman
ae29a0dbe5
PVS-Studio founds some errors, I fixed it.
2025-03-07 20:39:20 +03:00
IRainman
aba93f306f
Additional compile time cleanup. When FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN is enabled we assume that we are in parser code with external loop that checks bounds.
...
Function cpp20_and_in_constexpr() now is really compile time evaluated. TODO fix warnings.
2025-03-07 14:51:20 +03:00
IRainman
9ebac23081
Added a config option FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN for faster and more compact code parsing numbers with input support only positive C/C++ style numbers without nan or inf. That case is very useful in mathematical applications, game development, CSS parsing, embedded code, etc...
...
Additional improve in constant initialization.
2025-03-06 22:25:05 +03:00
IRainman
63f6abebdf
* Added an option disallow_leading_sign and stronger constexpr / consteval, also significantly reduce register pressure by reducing copy of constant data.
2025-03-06 18:29:16 +03:00
Johan Råde
d4d5748ec8
Silenced Visual Studio compiler warning
...
This code caused a C4127 "conditional expression is constant" compiler warning
when compiled with Visual Studio at warning level 4 with T a signed integer type.
2025-01-16 16:12:34 +01:00
Anders Dalvander
1a15c66fb9
harmonize files to use "east const"
...
manually checked modified files for errors, but not committing .clang-format due to the following warning:
>>> Setting `QualifierAlignment` to something other than `Leave`, COULD lead to incorrect code formatting due to incorrect decisions made due to clang-formats lack of complete semantic information. As such extra care should be taken to review code changes made by the use of this option.
2024-11-23 09:46:18 +01:00
Anders Dalvander
48252a6483
check feature macros in once place
2024-11-21 00:08:19 +01:00
Anders Dalvander
0bbba960f4
move from feature macros to format flags
2024-11-21 00:06:08 +01:00
Anders Dalvander
b3526da935
uint64_t as enum base for chars_format
2024-11-20 23:01:56 +01:00
Anders Dalvander
b8b5da75a5
enum class chars_format
2024-11-20 09:33:16 +01:00
Anders Dalvander
72b2a7382a
const ness
2024-11-17 16:22:05 +01:00
Daniel Lemire
5ad6aae0b1
lint
2024-08-14 09:57:47 -04:00
Leszek Swirski
b6ce2c4de6
Record parse failure reason and location
...
In parse_number_string, if there is a parse error, report the specific
error as one of the values in a new parse_error enum, and update
lastmatch to match the error location. This allows users of the library
to print more helpful error messages for invalid inputs.
2024-07-23 18:11:10 +02:00
Leszek Swirski
e6777f2eef
Allow JSON empty exponent as trailing junk
...
Revert #251 , and instead allow an invalid trailing empty exponent to be
treated as junk data in JSON parsing. Expand the test suite to test this
case, including testing the trailing junk.
2024-07-23 14:56:42 +02:00
Leszek Swirski
b57207c811
Disallow empty exponent in JSON parsing
...
The JSON spec requires at least one digit in the exponential part, if
specified.
2024-07-22 12:34:58 +02:00
Daniel Lemire
56a0092895
removing unused function
2024-03-20 14:24:16 -04:00
Daniel Lemire
eb584f748e
explicit cast
2024-01-28 13:29:55 -05:00
Daniel Lemire
1d97749791
Verify and fix issue 235
2024-01-28 10:47:21 -05:00
Maya Warrier
882a716c12
Explicit curly bracket where suggested
...
Co-authored-by: Daniel Lemire <daniel@lemire.me>
2023-12-14 16:28:23 -05:00
Maya Warrier
bdee16bcad
- Add SIMD acceleration to fast_int
...
- fix MSVC warning
2023-12-13 17:42:30 -05:00
Maya Warrier
36aaded3dd
Fix handling of leading zeros
2023-12-13 17:11:41 -05:00
Maya Warrier
a30fe866f6
Fix bugs highlighted in tests
2023-12-12 22:35:58 -05:00
Maya Warrier
624ba49434
Fix more Werrors
...
- Werror=conversion,char-subscripts
2023-12-12 21:26:48 -05:00
Maya Warrier
7a21a8d6d7
Return invalid_argument in more places
2023-12-12 02:36:18 -05:00
Maya Warrier
3d446f1eba
Fix gcc werrors
2023-12-12 01:56:24 -05:00
Maya Warrier
c9527c2e4f
Skip leading zeros
2023-12-11 04:27:22 -05:00
Maya Warrier
122220e2f0
Version 1 of from_chars integer parser
2023-12-11 04:17:26 -05:00
Daniel Lemire
7646f819a8
Merge branch 'main' of github.com:allenbarnett5/fast_float_ftn into fortran
2023-09-15 09:43:27 -04:00
Maya Warrier
ce562d9c65
Disallow inf/nan in json mode
2023-09-14 20:51:26 -04:00
Maya Warrier
2395482ad5
Ignore FASTFLOAT_ALLOWS_LEADING_PLUS for JSON format
2023-09-14 19:50:21 -04:00
Maya Warrier
4de8d715e6
Add json fmt test
2023-09-13 21:07:40 -04:00
Maya Warrier
3f250c5a98
Use chars_format instead of parse_rules for parsing as JSON
2023-09-13 20:03:10 -04:00
Maya Warrier
396f41271f
Implement JSON rules
2023-09-13 19:19:37 -04:00
allen.barnett@paperbirchsoftware.com
e22c027544
Allow fast_float to parse strings accepted by the Fortran internal read
...
function.
2023-08-07 08:39:06 -04:00
Maya Warrier
c5ecb5db9b
Fix for MSVC v140
2023-06-11 22:22:06 -04:00
Pharago
b8e3307fbd
Fix broken msvc v140
...
When using msvc v140 (Visual Studio 2015 Toolset), compilation fails.
2023-06-10 05:46:30 +02:00
Daniel Lemire
3cab724b80
Minor fixes
2023-06-09 12:30:20 -04:00
Daniel Lemire
b88345d06d
Fixes
2023-06-09 11:28:51 -04:00
Daniel Lemire
e8c0378d6d
Adding ARM NEON optimizations.
2023-06-09 11:19:34 -04:00
Maya Warrier
a5632d5b57
Fix digit comparison, cleanup
2023-05-20 12:29:24 -04:00
Maya Warrier
cb397ef446
Fix for clang (missing _mm_cvtsi128_si64x)
2023-05-17 05:40:29 -04:00
Maya Warrier
1c9a3088bf
Fix for VS 32-bit
2023-05-17 05:31:15 -04:00
Maya Warrier
064d2b832d
Fix Werrors
2023-05-17 02:27:48 -04:00