Skip to content

Commit

Permalink
At the moment, clang\apple clang does not support a version of the `f…
Browse files Browse the repository at this point in the history
…rom_chars` function (needed for `std::string_view`) for the `double` type.
  • Loading branch information
ttldtor committed Mar 31, 2024
1 parent 9c19640 commit 4827f4c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions include/dxfeed_graal_cpp_api/internal/Common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -741,15 +741,15 @@ struct StringLikeWrapper {

// At the moment, clang\apple clang's std lib does not support a version of the `from_chars` function (needed
// for `std::string_view`) for the `double` type.
if constexpr (isLibCPP) {
auto s = this->operator std::string();
#ifdef _LIBCPP_VERSION
auto s = this->operator std::string();

result = std::stod(s);
} else {
auto sw = this->operator std::string_view();
result = std::stod(s);
#else
auto sw = this->operator std::string_view();

std::from_chars(sw.data(), sw.data() + sw.size(), result);
}
std::from_chars(sw.data(), sw.data() + sw.size(), result);
#endif

return result;
}
Expand Down

0 comments on commit 4827f4c

Please sign in to comment.