diff --git a/include/fmt/base.h b/include/fmt/base.h index 74144fe9..e7597abf 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -1882,7 +1882,6 @@ class context { using iterator = appender; using format_arg = basic_format_arg; - using format_args = basic_format_args; using parse_context_type = basic_format_parse_context; template using formatter_type = formatter; @@ -1890,7 +1889,7 @@ class context { Constructs a ``basic_format_context`` object. References to the arguments are stored in the object so make sure they have appropriate lifetimes. */ - FMT_CONSTEXPR context(iterator out, format_args ctx_args, + FMT_CONSTEXPR context(iterator out, basic_format_args ctx_args, detail::locale_ref loc = {}) : out_(out), args_(ctx_args), loc_(loc) {} context(context&&) = default; @@ -1902,7 +1901,7 @@ class context { FMT_CONSTEXPR auto arg_id(string_view name) -> int { return args_.get_id(name); } - auto args() const -> const format_args& { return args_; } + auto args() const -> const basic_format_args& { return args_; } // This function is intentionally not constexpr to give a compile-time error. void on_error(const char* message) { throw_format_error(message); } diff --git a/include/fmt/format.h b/include/fmt/format.h index 174c2c42..efd89df2 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -1020,11 +1020,11 @@ template class generic_context { public: using char_type = Char; using iterator = OutputIt; - using format_args = basic_format_args; using parse_context_type = basic_format_parse_context; template using formatter_type = formatter; - constexpr generic_context(OutputIt out, format_args ctx_args, + constexpr generic_context(OutputIt out, + basic_format_args ctx_args, detail::locale_ref loc = {}) : out_(out), args_(ctx_args), loc_(loc) {} generic_context(generic_context&&) = default; @@ -1040,7 +1040,9 @@ template class generic_context { FMT_CONSTEXPR auto arg_id(basic_string_view name) -> int { return args_.get_id(name); } - auto args() const -> const format_args& { return args_; } + auto args() const -> const basic_format_args& { + return args_; + } void on_error(const char* message) { throw_format_error(message); }