mirror of
https://github.com/fmtlib/fmt.git
synced 2025-01-04 17:40:35 +00:00
Add an experimental path
This commit is contained in:
parent
af8cd4e404
commit
18a9676d95
@ -158,6 +158,22 @@ template <typename Char> struct formatter<std::filesystem::path, Char> {
|
|||||||
specs);
|
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
|
FMT_END_NAMESPACE
|
||||||
#endif // FMT_CPP_LIB_FILESYSTEM
|
#endif // FMT_CPP_LIB_FILESYSTEM
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user