A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/fmtlib/fmt/issues/3817 below:

The vformat & vprint functions produce incorrect output when mixing named and positional arguments. · Issue #3817 · fmtlib/fmt · GitHub

When using the dynamic_format_arg_store with both named and positional args on fmt, the output produced is incorrect.

A minimal reproduction of the issue is shown in the snippet below:

A minimal reproduction of the issue is shown in the snippet below:
#include <fmt/args.h>
#include <fmt/core.h>

int main() {
    fmt::dynamic_format_arg_store<fmt::format_context> store;
    store.push_back(1);
    store.push_back(fmt::arg("b", 2));
    store.push_back(3);

    // Prints 1 2 2 instead of 1 2 3
    fmt::vprint("{} {b} {}", store);
}

godbolt link


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4