-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove fmt tasks switch from fmt to std::format internally.
- Loading branch information
Showing
30 changed files
with
96 additions
and
11,242 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#pragma once | ||
|
||
#include "../utility/string.h" | ||
|
||
template <> | ||
struct std::formatter<std::wstring, char> : std::formatter<std::string, char> { | ||
template <class FmtContext> | ||
FmtContext::iterator format(std::wstring const& s, FmtContext& ctx) const | ||
{ | ||
return std::formatter<std::string, char>::format(mob::utf16_to_utf8(s), ctx); | ||
} | ||
}; | ||
|
||
template <> | ||
struct std::formatter<std::filesystem::path, char> | ||
: std::formatter<std::basic_string<std::filesystem::path::value_type>, char> { | ||
template <class FmtContext> | ||
FmtContext::iterator format(std::filesystem::path const& s, FmtContext& ctx) const | ||
{ | ||
return std::formatter<std::basic_string<std::filesystem::path::value_type>, | ||
char>::format(s.native(), ctx); | ||
} | ||
}; | ||
|
||
template <class Enum, class CharT> | ||
requires std::is_enum_v<Enum> | ||
struct std::formatter<Enum, CharT> | ||
: std::formatter<std::underlying_type_t<Enum>, CharT> { | ||
template <class FmtContext> | ||
FmtContext::iterator format(Enum v, FmtContext& ctx) const | ||
{ | ||
return std::formatter<std::underlying_type_t<Enum>, CharT>::format( | ||
static_cast<std::underlying_type_t<Enum>>(v), ctx); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
#include "pch.h" | ||
#include <fmt/format.cc> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.