From ceeddf1213812836cb763338653163e750b8e585 Mon Sep 17 00:00:00 2001 From: Daniel Frey Date: Wed, 20 Nov 2024 20:18:36 +0100 Subject: [PATCH] Still to from_chars for floating point types in libc++ --- src/lib/pq/result_traits.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/pq/result_traits.cpp b/src/lib/pq/result_traits.cpp index a8fc74d..2020a1a 100644 --- a/src/lib/pq/result_traits.cpp +++ b/src/lib/pq/result_traits.cpp @@ -12,6 +12,7 @@ #include #include #include +#include namespace tao::pq { @@ -127,17 +128,17 @@ namespace tao::pq auto result_traits< float >::from( const char* value ) -> float { - return internal::from_chars< float >( value ); + return internal::strtof( value ); } auto result_traits< double >::from( const char* value ) -> double { - return internal::from_chars< double >( value ); + return internal::strtod( value ); } auto result_traits< long double >::from( const char* value ) -> long double { - return internal::from_chars< long double >( value ); + return internal::strtold( value ); } auto result_traits< binary >::from( const char* value ) -> binary