Update std implementation

This commit is contained in:
Victor Zverovich
2019-02-10 06:34:47 -08:00
parent 442fa1bd46
commit e4572e5def
3 changed files with 50 additions and 46 deletions

View File

@@ -1337,7 +1337,7 @@ struct char_t : std::enable_if<internal::is_string<S>::value,
namespace internal {
template <typename Context>
FMT_CONSTEXPR basic_format_arg<Context> get_arg(Context& ctx, unsigned id) {
FMT_CONSTEXPR typename Context::format_arg get_arg(Context& ctx, unsigned id) {
auto arg = ctx.arg(id);
if (!arg) ctx.on_error("argument index out of range");
return arg;

View File

@@ -343,6 +343,7 @@ class basic_printf_context {
public:
/** The character type for the output. */
typedef Char char_type;
typedef basic_format_arg<basic_printf_context> format_arg;
template <typename T> struct formatter_type {
typedef printf_formatter<T> type;
@@ -350,7 +351,6 @@ class basic_printf_context {
private:
typedef internal::context_base<OutputIt, basic_printf_context, Char> base;
typedef basic_format_arg<basic_printf_context> format_arg;
typedef basic_format_specs<char_type> format_specs;
OutputIt out_;