fastfloat / fast_float

Fast and exact implementation of the C++ from_chars functions for number types: 4x to 10x faster than strtod, part of GCC 12, Chromium, Redis and WebKit/Safari
Apache License 2.0
1.54k stars 132 forks source link

warning STL4038: The contents of <stdfloat> are available only with C++23 or later. #238

Closed wojdyr closed 8 months ago

wojdyr commented 9 months ago

I updated fast_float and see a warnings from MSVC

C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\stdfloat(12): warning STL4038: The contents of <stdfloat> are available only with C++23 or later.

Because of <stdfloat>:

https://github.com/fastfloat/fast_float/blob/8378916ed814bebc4bcbf519c66f7c38c8374594/include/fast_float/float_common.h#L10C1-L14C7

In addition to checking for the header, the version of the standard should also be checked. Here is how the same warning was fixed in Boost.Math: https://github.com/boostorg/math/pull/1024/files

lemire commented 9 months ago

Pull request invited.