Add an experimental path

This commit is contained in:
Victor Zverovich 2024-06-21 08:02:12 -07:00
parent af8cd4e404
commit 18a9676d95

View File

@ -158,6 +158,22 @@ template <typename Char> struct formatter<std::filesystem::path, Char> {
specs);
}
};
class path : public std::filesystem::path {
public:
auto display_string() const -> std::string {
const std::filesystem::path& base = *this;
return fmt::format(FMT_STRING("{}"), base);
}
auto system_string() const -> std::string { return string(); }
auto generic_display_string() const -> std::string {
const std::filesystem::path& base = *this;
return fmt::format(FMT_STRING("{:g}"), base);
}
auto generic_system_string() const -> std::string { return generic_string(); }
};
FMT_END_NAMESPACE
#endif // FMT_CPP_LIB_FILESYSTEM