mirror of
https://github.com/shadps4-emu/ext-fmt.git
synced 2024-11-23 09:49:42 +00:00
30 lines
662 B
C
30 lines
662 B
C
|
// Formatting library for C++ - formatters for standard library types
|
||
|
//
|
||
|
// Copyright (c) 2012 - present, Victor Zverovich
|
||
|
// All rights reserved.
|
||
|
//
|
||
|
// For the license information refer to format.h.
|
||
|
|
||
|
#ifndef FMT_STD_H_
|
||
|
#define FMT_STD_H_
|
||
|
|
||
|
#include <version>
|
||
|
|
||
|
#ifdef __cpp_lib_filesystem
|
||
|
# include <filesystem>
|
||
|
|
||
|
namespace fmt {
|
||
|
|
||
|
template <> struct formatter<std::filesystem::path> : formatter<string_view> {
|
||
|
template <typename FormatContext>
|
||
|
auto format(const path& p, FormatContext& ctx) const ->
|
||
|
typename FormatContext::iterator {
|
||
|
return formatter<string_view>::format(p.string(), ctx);
|
||
|
}
|
||
|
};
|
||
|
|
||
|
} // namespace fmt
|
||
|
#endif
|
||
|
|
||
|
#endif // FMT_STD_H_
|