mirror of
https://github.com/fmtlib/fmt.git
synced 2026-04-28 18:02:08 +02:00
Make value the second argument to format_value
This commit is contained in:
+4
-4
@@ -1355,8 +1355,8 @@ TEST(FormatterTest, FormatCStringRef) {
|
||||
EXPECT_EQ("test", format("{0}", CStringRef("test")));
|
||||
}
|
||||
|
||||
void format_value(fmt::Writer &w, fmt::basic_formatter<char> &f,
|
||||
const char *, const Date &d) {
|
||||
void format_value(fmt::Writer &w, const Date &d, fmt::basic_formatter<char> &f,
|
||||
const char *) {
|
||||
f.writer() << d.year() << '-' << d.month() << '-' << d.day();
|
||||
}
|
||||
|
||||
@@ -1369,8 +1369,8 @@ TEST(FormatterTest, FormatCustom) {
|
||||
class Answer {};
|
||||
|
||||
template <typename Char>
|
||||
void format_value(BasicWriter<Char> &w, fmt::basic_formatter<Char> &f,
|
||||
const Char *, Answer) {
|
||||
void format_value(BasicWriter<Char> &w, Answer, fmt::basic_formatter<Char> &f,
|
||||
const Char *) {
|
||||
f.writer() << "42";
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -64,8 +64,8 @@ namespace {
|
||||
struct Test {};
|
||||
|
||||
template <typename Char>
|
||||
void format_value(fmt::BasicWriter<Char> &w, fmt::basic_formatter<Char> &f,
|
||||
const Char *, Test) {
|
||||
void format_value(fmt::BasicWriter<Char> &w, Test,
|
||||
fmt::basic_formatter<Char> &f, const Char *) {
|
||||
w << "test";
|
||||
}
|
||||
|
||||
@@ -582,8 +582,8 @@ struct CustomFormatter {
|
||||
typedef char char_type;
|
||||
};
|
||||
|
||||
void format_value(fmt::Writer &, CustomFormatter &, const char *&s,
|
||||
const Test &) {
|
||||
void format_value(fmt::Writer &, const Test &, CustomFormatter &,
|
||||
const char *&s) {
|
||||
s = "custom_format";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user