merge bitcoin#25808: work around u8path deprecated-declaration warnings with libc++

This commit is contained in:
Kittywhiskers Van Gogh 2022-08-08 17:16:36 +01:00 committed by pasta
parent aa361b2717
commit d2c968bf91
No known key found for this signature in database
GPG Key ID: 52527BEDABE87984

View File

@ -68,7 +68,11 @@ public:
static inline path u8path(const std::string& utf8_str) static inline path u8path(const std::string& utf8_str)
{ {
#if __cplusplus < 202002L
return std::filesystem::u8path(utf8_str); 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 // Disallow implicit std::string conversion for absolute to avoid