Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent parameter ordering in localized vformat_to #2327

Closed
DanielaE opened this issue May 30, 2021 · 2 comments
Closed

Inconsistent parameter ordering in localized vformat_to #2327

DanielaE opened this issue May 30, 2021 · 2 comments

Comments

@DanielaE
Copy link
Contributor

Overload for char:

template <typename OutputIt, typename Locale>
auto vformat_to(const Locale& loc, OutputIt out, string_view fmt, format_args args)

Overload for Charchar:

template <typename Locale, typename S, typename OutputIt, typename... Args, typename Char = char_t<S>>
inline OutputIt vformat_to(
    OutputIt out, const Locale& loc, const S& format_str,
    basic_format_args<buffer_context<type_identity_t<Char>>> args);

Is this intended? All other localized API overloads take the locale as their first parameter.

@vitaut
Copy link
Contributor

vitaut commented May 30, 2021

Good catch, thanks. This is not intended and in both cases the output iterator should go first (https://en.cppreference.com/w/cpp/utility/format/vformat_to).

@vitaut
Copy link
Contributor

vitaut commented May 30, 2021

Fixed in 832ec09.

@vitaut vitaut closed this as completed May 30, 2021
DanielaE added a commit to DanielaE/fmt that referenced this issue May 30, 2021
vitaut pushed a commit that referenced this issue May 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants