basic_buffer -> buffer
This reduces symbol sizes and gets rid of shadowing warnings.
diff --git a/include/fmt/printf.h b/include/fmt/printf.h
index 50a3de4..32d07f6 100644
--- a/include/fmt/printf.h
+++ b/include/fmt/printf.h
@@ -180,7 +180,7 @@
};
template <typename Char, typename Context>
-void printf(basic_buffer<Char>& buf, basic_string_view<Char> format,
+void printf(buffer<Char>& buf, basic_string_view<Char> format,
basic_format_args<Context> args) {
Context(std::back_inserter(buf), format, args).format();
}
@@ -198,8 +198,8 @@
template <typename Range> class printf_arg_formatter;
template <typename OutputIt, typename Char,
- typename ArgFormatter = printf_arg_formatter<
- back_insert_range<internal::basic_buffer<Char>>>>
+ typename ArgFormatter =
+ printf_arg_formatter<back_insert_range<internal::buffer<Char>>>>
class basic_printf_context;
/**
@@ -578,8 +578,8 @@
type;
};
-typedef basic_printf_context_t<internal::buffer>::type printf_context;
-typedef basic_printf_context_t<internal::wbuffer>::type wprintf_context;
+typedef basic_printf_context_t<internal::buffer<char>>::type printf_context;
+typedef basic_printf_context_t<internal::buffer<wchar_t>>::type wprintf_context;
typedef basic_format_args<printf_context> printf_args;
typedef basic_format_args<wprintf_context> wprintf_args;
@@ -612,7 +612,7 @@
inline std::basic_string<Char> vsprintf(
const S& format,
basic_format_args<
- typename basic_printf_context_t<internal::basic_buffer<Char>>::type>
+ typename basic_printf_context_t<internal::buffer<Char>>::type>
args) {
basic_memory_buffer<Char> buffer;
printf(buffer, to_string_view(format), args);
@@ -633,7 +633,7 @@
inline std::basic_string<FMT_CHAR(S)> sprintf(const S& format,
const Args&... args) {
internal::check_format_string<Args...>(format);
- typedef internal::basic_buffer<FMT_CHAR(S)> buffer;
+ typedef internal::buffer<FMT_CHAR(S)> buffer;
typedef typename basic_printf_context_t<buffer>::type context;
format_arg_store<context, Args...> as{args...};
return vsprintf(to_string_view(format), basic_format_args<context>(as));
@@ -643,7 +643,7 @@
inline int vfprintf(
std::FILE* f, const S& format,
basic_format_args<
- typename basic_printf_context_t<internal::basic_buffer<Char>>::type>
+ typename basic_printf_context_t<internal::buffer<Char>>::type>
args) {
basic_memory_buffer<Char> buffer;
printf(buffer, to_string_view(format), args);
@@ -666,7 +666,7 @@
FMT_ENABLE_IF(internal::is_string<S>::value)>
inline int fprintf(std::FILE* f, const S& format, const Args&... args) {
internal::check_format_string<Args...>(format);
- typedef internal::basic_buffer<FMT_CHAR(S)> buffer;
+ typedef internal::buffer<FMT_CHAR(S)> buffer;
typedef typename basic_printf_context_t<buffer>::type context;
format_arg_store<context, Args...> as{args...};
return vfprintf(f, to_string_view(format), basic_format_args<context>(as));
@@ -676,7 +676,7 @@
inline int vprintf(
const S& format,
basic_format_args<
- typename basic_printf_context_t<internal::basic_buffer<Char>>::type>
+ typename basic_printf_context_t<internal::buffer<Char>>::type>
args) {
return vfprintf(stdout, to_string_view(format), args);
}
@@ -694,7 +694,7 @@
FMT_ENABLE_IF(internal::is_string<S>::value)>
inline int printf(const S& format_str, const Args&... args) {
internal::check_format_string<Args...>(format_str);
- typedef internal::basic_buffer<FMT_CHAR(S)> buffer;
+ typedef internal::buffer<FMT_CHAR(S)> buffer;
typedef typename basic_printf_context_t<buffer>::type context;
format_arg_store<context, Args...> as{args...};
return vprintf(to_string_view(format_str), basic_format_args<context>(as));
@@ -704,7 +704,7 @@
inline int vfprintf(
std::basic_ostream<Char>& os, const S& format,
basic_format_args<
- typename basic_printf_context_t<internal::basic_buffer<Char>>::type>
+ typename basic_printf_context_t<internal::buffer<Char>>::type>
args) {
basic_memory_buffer<Char> buffer;
printf(buffer, to_string_view(format), args);
@@ -726,7 +726,7 @@
inline int fprintf(std::basic_ostream<FMT_CHAR(S)>& os, const S& format_str,
const Args&... args) {
internal::check_format_string<Args...>(format_str);
- typedef internal::basic_buffer<FMT_CHAR(S)> buffer;
+ typedef internal::buffer<FMT_CHAR(S)> buffer;
typedef typename basic_printf_context_t<buffer>::type context;
format_arg_store<context, Args...> as{args...};
return vfprintf(os, to_string_view(format_str),