write -> write_str
This commit is contained in:
parent
14e7ed76df
commit
b939860d6e
4
format.h
4
format.h
@ -1435,7 +1435,7 @@ class BasicWriter {
|
||||
return *this;
|
||||
}
|
||||
|
||||
void write(const std::basic_string<Char> &s, const FormatSpec &spec) {
|
||||
void write_str(const std::basic_string<Char> &s, const FormatSpec &spec) {
|
||||
write_str(s.data(), s.size(), spec);
|
||||
}
|
||||
|
||||
@ -1645,7 +1645,7 @@ template <typename Char, typename T>
|
||||
void format(BasicWriter<Char> &w, const FormatSpec &spec, const T &value) {
|
||||
std::basic_ostringstream<Char> os;
|
||||
os << value;
|
||||
w.write(os.str(), spec);
|
||||
w.write_str(os.str(), spec);
|
||||
}
|
||||
|
||||
namespace internal {
|
||||
|
@ -1319,7 +1319,7 @@ class Answer {};
|
||||
|
||||
template <typename Char>
|
||||
void format(BasicWriter<Char> &w, const fmt::FormatSpec &spec, Answer) {
|
||||
w.write("42", spec);
|
||||
w.write_str("42", spec);
|
||||
}
|
||||
|
||||
TEST(FormatterTest, CustomFormat) {
|
||||
|
Loading…
Reference in New Issue
Block a user