Skip to content

Commit

Permalink
tweak to the check
Browse files Browse the repository at this point in the history
  • Loading branch information
fosterbrereton committed Jun 25, 2024
1 parent 0c1f2bd commit 68796bc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions source/string.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include <adobe/string/to_string.hpp>

#if defined(__cpp_lib_to_chars) >= 201611L
#if __cpp_lib_to_chars >= 201611L
#include <array>
#include <charconv>
#include <system_error>
Expand All @@ -24,7 +24,7 @@ std::string to_string(double x) {
if (x == std::numeric_limits<double>::infinity()) return "Infinity";
if (x == -std::numeric_limits<double>::infinity()) return "-Infinity";

#if defined(__cpp_lib_to_chars) >= 201611L
#if __cpp_lib_to_chars >= 201611L
std::array<char, 64> str;
char* first = &str[0];
char* last = first + str.size();
Expand Down
4 changes: 2 additions & 2 deletions test/to_string/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ std::string asl_to_string(const test_t& test) {
}

std::string std_to_chars(const test_t& test) {
#if defined(__cpp_lib_to_chars) >= 201611L
#if __cpp_lib_to_chars >= 201611L
std::array<char, 64> str;
if (auto [ptr, ec] = std::to_chars(str.data(), str.data() + str.size(), test.value_m); ec == std::errc()) {
const auto sz = ptr - str.data();
Expand Down Expand Up @@ -151,7 +151,7 @@ std::size_t test_suite(std::string (*convert)(const test_t& test), const char* l
/******************************************************************************/

BOOST_AUTO_TEST_CASE(serialization_test_suite) {
#if defined(__cpp_lib_to_chars) >= 201611L
#if __cpp_lib_to_chars >= 201611L
constexpr auto to_string_match_count_k = 10;
constexpr auto to_chars_match_count_k = 6;
#else
Expand Down

0 comments on commit 68796bc

Please sign in to comment.