mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-30 10:47:35 +02:00
Avoid shadowing
This commit is contained in:
@ -2936,11 +2936,10 @@ FMT_API void vprintln(FILE* f, string_view fmt, format_args args);
|
|||||||
*/
|
*/
|
||||||
template <typename... T>
|
template <typename... T>
|
||||||
FMT_INLINE void print(format_string<T...> fmt, T&&... args) {
|
FMT_INLINE void print(format_string<T...> fmt, T&&... args) {
|
||||||
fmt::vargs<T...> vargs = {{args...}};
|
vargs<T...> va = {{args...}};
|
||||||
if (!FMT_USE_UTF8)
|
if (!FMT_USE_UTF8) return detail::vprint_mojibake(stdout, fmt.str, va, false);
|
||||||
return detail::vprint_mojibake(stdout, fmt.str, vargs, false);
|
return detail::is_locking<T...>() ? vprint_buffered(stdout, fmt.str, va)
|
||||||
return detail::is_locking<T...>() ? vprint_buffered(stdout, fmt.str, vargs)
|
: vprint(fmt.str, va);
|
||||||
: vprint(fmt.str, vargs);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2953,19 +2952,19 @@ FMT_INLINE void print(format_string<T...> fmt, T&&... args) {
|
|||||||
*/
|
*/
|
||||||
template <typename... T>
|
template <typename... T>
|
||||||
FMT_INLINE void print(FILE* f, format_string<T...> fmt, T&&... args) {
|
FMT_INLINE void print(FILE* f, format_string<T...> fmt, T&&... args) {
|
||||||
fmt::vargs<T...> vargs = {{args...}};
|
vargs<T...> va = {{args...}};
|
||||||
if (!FMT_USE_UTF8) return detail::vprint_mojibake(f, fmt.str, vargs, false);
|
if (!FMT_USE_UTF8) return detail::vprint_mojibake(f, fmt.str, va, false);
|
||||||
return detail::is_locking<T...>() ? vprint_buffered(f, fmt.str, vargs)
|
return detail::is_locking<T...>() ? vprint_buffered(f, fmt.str, va)
|
||||||
: vprint(f, fmt.str, vargs);
|
: vprint(f, fmt.str, va);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Formats `args` according to specifications in `fmt` and writes the output
|
/// Formats `args` according to specifications in `fmt` and writes the output
|
||||||
/// to the file `f` followed by a newline.
|
/// to the file `f` followed by a newline.
|
||||||
template <typename... T>
|
template <typename... T>
|
||||||
FMT_INLINE void println(FILE* f, format_string<T...> fmt, T&&... args) {
|
FMT_INLINE void println(FILE* f, format_string<T...> fmt, T&&... args) {
|
||||||
fmt::vargs<T...> vargs = {{args...}};
|
vargs<T...> va = {{args...}};
|
||||||
return FMT_USE_UTF8 ? vprintln(f, fmt.str, vargs)
|
return FMT_USE_UTF8 ? vprintln(f, fmt.str, va)
|
||||||
: detail::vprint_mojibake(f, fmt.str, vargs, true);
|
: detail::vprint_mojibake(f, fmt.str, va, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Formats `args` according to specifications in `fmt` and writes the output
|
/// Formats `args` according to specifications in `fmt` and writes the output
|
||||||
|
Reference in New Issue
Block a user