Skip to content

Commit

Permalink
Still to from_chars for floating point types in libc++
Browse files Browse the repository at this point in the history
  • Loading branch information
d-frey committed Nov 20, 2024
1 parent c835b38 commit ceeddf1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/lib/pq/result_traits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <tao/pq/binary.hpp>
#include <tao/pq/internal/from_chars.hpp>
#include <tao/pq/internal/resize_uninitialized.hpp>
#include <tao/pq/internal/strtox.hpp>

namespace tao::pq
{
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ceeddf1

Please sign in to comment.