From d2c968bf913ac9f15a41f847d7b7d64cc0edd615 Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com> Date: Mon, 8 Aug 2022 17:16:36 +0100 Subject: [PATCH] merge bitcoin#25808: work around u8path deprecated-declaration warnings with libc++ --- src/fs.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/fs.h b/src/fs.h index e50e7ef187..02a70103c6 100644 --- a/src/fs.h +++ b/src/fs.h @@ -68,7 +68,11 @@ public: static inline path u8path(const std::string& utf8_str) { +#if __cplusplus < 202002L return std::filesystem::u8path(utf8_str); +#else + return std::filesystem::path(std::u8string{utf8_str.begin(), utf8_str.end()}); +#endif } // Disallow implicit std::string conversion for absolute to avoid