Add char8_t feature guard.

This commit is contained in:
zel1b08a 2024-12-07 20:56:08 +07:00 committed by GitHub
parent 4c5083dd3f
commit efac3b36ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -435,7 +435,12 @@ inline void to_json(BasicJsonType& j, const T& t)
template<typename BasicJsonType>
inline void to_json(BasicJsonType& j, const std_fs::path& p)
{
#if defined __cpp_lib_char8_t
j = reinterpret_cast<char const*>(p.u8string().data());
#else
j = p.u8string();
#endif
}
#endif