oxen-core/src/common/fs-format.h

20 lines
423 B
C
Raw Permalink Normal View History

2022-10-11 01:25:23 +02:00
#pragma once
#include "fs.h"
#ifndef USE_GHC_FILESYSTEM
#include <fmt/std.h>
#else
#include <fmt/core.h>
2022-10-11 01:25:23 +02:00
namespace fmt {
2023-04-13 15:50:13 +02:00
template <>
struct formatter<ghc::filesystem::path> : formatter<std::string> {
template <typename FormatContext>
auto format(const ghc::filesystem::path& val, FormatContext& ctx) const {
return formatter<std::string>::format(val.u8string(), ctx);
}
};
} // namespace fmt
2022-10-11 01:25:23 +02:00
#endif