Skip to content

Commit

Permalink
Add an experimental path
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed Jun 21, 2024
1 parent af8cd4e commit 18a9676
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions include/fmt/std.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 18a9676

Please sign in to comment.