Updated comment for float32_t and float64_t conversions in from_chars

This commit is contained in:
MTahaK 2023-12-12 17:56:14 -05:00
parent f74e338e0a
commit d8dbbc54ab

View File

@ -138,8 +138,8 @@ FASTFLOAT_CONSTEXPR20
from_chars_result_t<UC> from_chars(UC const * first, UC const * last,
T &value, chars_format fmt /*= chars_format::general*/) noexcept {
#ifdef __STDCPP_FLOAT32_T__ == 1
// if std::float32_t is defined, then we are in C++23 mode; call value as a float
// due to equivalence between float and float32_t
// if std::float32_t is defined, then we are in C++23 mode; macro set for float32;
// set value to float due to equivalence between float and float32_t
if(std::is_same<T, std::float32_t>::value){
float value32;
from_chars_result_t<UC> ret = from_chars_advanced(first, last, value32, parse_options_t<UC>{fmt});
@ -148,8 +148,8 @@ from_chars_result_t<UC> from_chars(UC const * first, UC const * last,
}
#endif
#ifdef __STDCPP_FLOAT64_T__ == 1
// if std::float64_t is defined, then we are in C++23 mode; call value as a double
// due to equivalence between double and float64_t
// if std::float64_t is defined, then we are in C++23 mode; macro set for float64;
// set value as double due to equivalence between double and float64_t
if(std::is_same<T, std::float64_t>::value){
double value64;
from_chars_result_t<UC> ret = from_chars_advanced(first, last, value64, parse_options_t<UC>{fmt});