This page is a snapshot from the LWG issues list, see theLibrary Active Issues List for more information and the meaning ofWP status.
println ignores the locale imbued instd::ostreamSection: 31.7.6.3.5[ostream.formatted.print]Status:WPSubmitter: Jens MaurerOpened: 2024-04-30Last modified: 2024-11-28
Priority:Not Prioritized
View all otherissues in [ostream.formatted.print].
View all issues withWP status.
Discussion:
31.7.6.3.5[ostream.formatted.print] specifies thatstd::print uses the localeimbued in thestd::ostream& argument for formatting, by using this equivalence:
vformat(os.getloc(), fmt, args);
(in thevformat_(non)unicode delegation).
std::println ignores thestd::ostream's localefor its locale-dependent formatting:print(os, "{}\n", format(fmt, std::forward<Args>(args)...));This is inconsistent.
[2024-10-03; Reflector poll]
Set status to Tentatively Ready after seven votes in favour during reflector poll.
[Wrocław 2024-11-23; Status changed: Voting → WP.]
Proposed resolution:
This wording is relative toN4981.
Modify 31.7.6.3.5[ostream.formatted.print] as indicated:
template<class... Args> void println(ostream& os, format_string<Args...> fmt, Args&&... args);-2-Effects: Equivalent to:
print(os, "{}\n", format(os.getloc(), fmt, std::forward<Args>(args)...));