Skip to content

Commit

Permalink
Use from_chars for float point types
Browse files Browse the repository at this point in the history
  • Loading branch information
d-frey committed Nov 20, 2024
1 parent c3be6ec commit c835b38
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/lib/pq/result_traits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#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 @@ -128,17 +127,17 @@ namespace tao::pq

auto result_traits< float >::from( const char* value ) -> float
{
return internal::strtof( value );
return internal::from_chars< float >( value );
}

auto result_traits< double >::from( const char* value ) -> double
{
return internal::strtod( value );
return internal::from_chars< double >( value );
}

auto result_traits< long double >::from( const char* value ) -> long double
{
return internal::strtold( value );
return internal::from_chars< long double >( value );
}

auto result_traits< binary >::from( const char* value ) -> binary
Expand Down

0 comments on commit c835b38

Please sign in to comment.