std::println(std::ostream)

Header: <ostream>

Formats args according to the format string fmt with appended ‘\n’ (which means that each output ends with a new-line), and inserts the result into os stream.

# Declarations

template< class... Args >
void println( std::ostream& os, std::format_string<Args...> fmt, Args&&... args );

(since C++23)

void println( std::ostream& os );

(since C++26)

# Parameters

# Return value

(none)

# Notes

Although overload (2) is added in C++26, all known implementations make it available in C++23 mode.

# Example

This section is incompleteReason: no example

# Defect reports

DRApplied toBehavior as publishedCorrect behavior
LWG 4088C++23(1) ignored the locale imbued in os in formatting argumentssuch locale is used

# See also