summaryrefslogtreecommitdiffstats
path: root/document
diff options
context:
space:
mode:
authorTor Egge <tegge@vespa.ai>2024-05-21 15:49:29 +0200
committerTor Egge <tegge@vespa.ai>2024-05-21 15:49:29 +0200
commitc0d732e37ca1e34e8b9c0446403158d9d5a09176 (patch)
treea70eb03b7ccd2373a5a2822e8dc5b228ae9661b5 /document
parent8482d3569219bed670a6ae6be0152beb5b614ff1 (diff)
libc++ 18 still needs workarounds.
Diffstat (limited to 'document')
-rw-r--r--document/src/vespa/document/select/parse_utils.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/document/src/vespa/document/select/parse_utils.cpp b/document/src/vespa/document/select/parse_utils.cpp
index f729541d4be..1cf2fca67e7 100644
--- a/document/src/vespa/document/select/parse_utils.cpp
+++ b/document/src/vespa/document/select/parse_utils.cpp
@@ -22,9 +22,10 @@ parse_i64(const char* str, size_t len, int64_t& out) {
auto res = std::from_chars(str, str+len, out, 10);
return (res.ec == std::errc()) && (res.ptr == str+len);
}
+
bool
parse_double(const char* str, size_t len, double& out) {
-#if defined(_LIBCPP_VERSION) && _LIBCPP_VERSION < 180000
+#if defined(_LIBCPP_VERSION) && _LIBCPP_VERSION < 190000
// Temporary workaround that also handles underflow (cf. issue 3081)
// until libc++ supports std::from_chars for double
char *str_end = const_cast<char*>(str) + len;