mirror of
https://github.com/fmtlib/fmt.git
synced 2025-12-06 16:57:03 +08:00
Fix a clang-tidy error
This commit is contained in:
parent
dcea616535
commit
17be91c079
@ -255,21 +255,6 @@ template <typename T> auto ptr(const std::shared_ptr<T>& p) -> const void* {
|
|||||||
|
|
||||||
#if FMT_CPP_LIB_FILESYSTEM
|
#if FMT_CPP_LIB_FILESYSTEM
|
||||||
|
|
||||||
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(); }
|
|
||||||
};
|
|
||||||
|
|
||||||
template <typename Char> struct formatter<std::filesystem::path, Char> {
|
template <typename Char> struct formatter<std::filesystem::path, Char> {
|
||||||
private:
|
private:
|
||||||
format_specs specs_;
|
format_specs specs_;
|
||||||
@ -319,6 +304,21 @@ template <typename Char> struct formatter<std::filesystem::path, Char> {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
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(); }
|
||||||
|
};
|
||||||
|
|
||||||
#endif // FMT_CPP_LIB_FILESYSTEM
|
#endif // FMT_CPP_LIB_FILESYSTEM
|
||||||
|
|
||||||
template <size_t N, typename Char>
|
template <size_t N, typename Char>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user