Add fmt::print. Undocument and deprecate old API.

This commit is contained in:
Victor Zverovich
2014-06-28 19:44:39 -07:00
parent 8dbfd723b6
commit 2e03963e9e
2 changed files with 52 additions and 92 deletions
+6
View File
@@ -1105,6 +1105,12 @@ void fmt::ANSITerminalSink::operator()(
std::fputs(RESET_COLOR, file_);
}
void fmt::print(StringRef format, const ArgList &args) {
Writer w;
w.format(format, args);
std::fwrite(w.data(), 1, w.size(), stdout);
}
// Explicit instantiations for char.
template fmt::BasicWriter<char>::CharPtr