write -> write_str

This commit is contained in:
Victor Zverovich 2014-06-30 15:44:08 -07:00
parent 14e7ed76df
commit b939860d6e
2 changed files with 3 additions and 3 deletions

View File

@ -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 {

View File

@ -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) {