Skip to content

Commit

Permalink
add macro USE_CUSTOM_TO_CHARS
Browse files Browse the repository at this point in the history
  • Loading branch information
bbbgan committed Apr 29, 2024
1 parent d38797a commit 89d7cd8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions iguana/detail/charconv.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ template <typename T>
char *to_chars(char *buffer, T value) noexcept {
using U = std::decay_t<T>;
if constexpr (std::is_floating_point_v<U>) {
#ifdef USE_CUSTOM_TO_CHARS
return iguana_custom_to_chars(value, buffer);
#else
return jkj::dragonbox::to_chars(value, buffer);
#endif
}
else if constexpr (std::is_signed_v<U> && (sizeof(U) >= 8)) {
return xtoa(value, buffer, 10, 1); // int64_t
Expand Down

0 comments on commit 89d7cd8

Please sign in to comment.