mirror of
https://github.com/fastfloat/fast_float.git
synced 2026-02-12 05:09:54 +08:00
commit
bc3be12530
@ -126,7 +126,7 @@ You can parse delimited numbers:
|
|||||||
|
|
||||||
## Reference
|
## Reference
|
||||||
|
|
||||||
- Daniel Lemire, [Number Parsing at a Gigabyte per Second](https://arxiv.org/abs/2101.11408), Software: Pratice and Experience 51 (8), 2021.
|
- Daniel Lemire, [Number Parsing at a Gigabyte per Second](https://arxiv.org/abs/2101.11408), Software: Practice and Experience 51 (8), 2021.
|
||||||
|
|
||||||
## Other programming languages
|
## Other programming languages
|
||||||
|
|
||||||
|
|||||||
@ -44,7 +44,7 @@ struct parse_options {
|
|||||||
* Like the C++17 standard, the `fast_float::from_chars` functions take an optional last argument of
|
* Like the C++17 standard, the `fast_float::from_chars` functions take an optional last argument of
|
||||||
* the type `fast_float::chars_format`. It is a bitset value: we check whether
|
* the type `fast_float::chars_format`. It is a bitset value: we check whether
|
||||||
* `fmt & fast_float::chars_format::fixed` and `fmt & fast_float::chars_format::scientific` are set
|
* `fmt & fast_float::chars_format::fixed` and `fmt & fast_float::chars_format::scientific` are set
|
||||||
* to determine whether we allowe the fixed point and scientific notation respectively.
|
* to determine whether we allow the fixed point and scientific notation respectively.
|
||||||
* The default is `fast_float::chars_format::general` which allows both `fixed` and `scientific`.
|
* The default is `fast_float::chars_format::general` which allows both `fixed` and `scientific`.
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
|||||||
@ -50,7 +50,7 @@
|
|||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <charconv>
|
#include <charconv>
|
||||||
|
|
||||||
// return true on succcess
|
// return true on success
|
||||||
bool check_file(std::string file_name) {
|
bool check_file(std::string file_name) {
|
||||||
std::cout << "Checking " << file_name << std::endl;
|
std::cout << "Checking " << file_name << std::endl;
|
||||||
size_t number{0};
|
size_t number{0};
|
||||||
|
|||||||
@ -132,7 +132,7 @@ bool allvalues() {
|
|||||||
|
|
||||||
inline void Assert(bool Assertion) {
|
inline void Assert(bool Assertion) {
|
||||||
#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__MINGW64__) || defined(sun) || defined(__sun)
|
#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__MINGW64__) || defined(sun) || defined(__sun)
|
||||||
if (!Assertion) { std::cerr << "Omitting hard falure on msys/cygwin/sun systems."; }
|
if (!Assertion) { std::cerr << "Omitting hard failure on msys/cygwin/sun systems."; }
|
||||||
#else
|
#else
|
||||||
if (!Assertion) { throw std::runtime_error("bug"); }
|
if (!Assertion) { throw std::runtime_error("bug"); }
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -44,8 +44,8 @@ float cygwin_strtof_l(const char* start, char** end) {
|
|||||||
|
|
||||||
inline void Assert(bool Assertion) {
|
inline void Assert(bool Assertion) {
|
||||||
#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__MINGW64__) || defined(sun) || defined(__sun)
|
#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__MINGW64__) || defined(sun) || defined(__sun)
|
||||||
if (!Assertion) { std::cerr << "Omitting hard falure on msys/cygwin/sun systems."; }
|
if (!Assertion) { std::cerr << "Omitting hard failure on msys/cygwin/sun systems."; }
|
||||||
#else
|
#else
|
||||||
if (!Assertion) { throw std::runtime_error("bug"); }
|
if (!Assertion) { throw std::runtime_error("bug"); }
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user