mirror of
https://github.com/gabime/spdlog.git
synced 2025-01-27 16:09:05 +08:00
Don't deduce return types for days / months
Required for C++11 support
This commit is contained in:
parent
06b8193a14
commit
ef665e959f
@ -79,8 +79,9 @@ static int to12h(const tm& t)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Abbreviated weekday name
|
//Abbreviated weekday name
|
||||||
static const auto& days() {
|
using days_array = std::array<std::string, 7>;
|
||||||
static const std::array<std::string, 7> arr{ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
|
static const days_array& days() {
|
||||||
|
static const days_array arr{ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
|
||||||
return arr;
|
return arr;
|
||||||
}
|
}
|
||||||
class a_formatter:public flag_formatter
|
class a_formatter:public flag_formatter
|
||||||
@ -92,8 +93,8 @@ class a_formatter:public flag_formatter
|
|||||||
};
|
};
|
||||||
|
|
||||||
//Full weekday name
|
//Full weekday name
|
||||||
static const auto& full_days() {
|
static const days_array& full_days() {
|
||||||
static const std::array<std::string, 7> arr{ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" };
|
static const days_array arr{ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" };
|
||||||
return arr;
|
return arr;
|
||||||
}
|
}
|
||||||
class A_formatter:public flag_formatter
|
class A_formatter:public flag_formatter
|
||||||
@ -105,8 +106,9 @@ class A_formatter:public flag_formatter
|
|||||||
};
|
};
|
||||||
|
|
||||||
//Abbreviated month
|
//Abbreviated month
|
||||||
static const auto& months() {
|
using months_array = std::array<std::string, 12>;
|
||||||
static const std::array<std::string, 12> arr{ "Jan", "Feb", "Mar", "Apr", "May", "June", "July", "Aug", "Sept", "Oct", "Nov", "Dec" };
|
static const months_array& months() {
|
||||||
|
static const months_array arr{ "Jan", "Feb", "Mar", "Apr", "May", "June", "July", "Aug", "Sept", "Oct", "Nov", "Dec" };
|
||||||
return arr;
|
return arr;
|
||||||
}
|
}
|
||||||
class b_formatter:public flag_formatter
|
class b_formatter:public flag_formatter
|
||||||
@ -118,8 +120,8 @@ class b_formatter:public flag_formatter
|
|||||||
};
|
};
|
||||||
|
|
||||||
//Full month name
|
//Full month name
|
||||||
static const auto& full_months() {
|
static const months_array& full_months() {
|
||||||
static const std::array<std::string, 12> arr{ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" };
|
static const months_array arr{ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" };
|
||||||
return arr;
|
return arr;
|
||||||
}
|
}
|
||||||
class B_formatter:public flag_formatter
|
class B_formatter:public flag_formatter
|
||||||
|
Loading…
Reference in New Issue
Block a user