Scroll to navigation

std::range_format(3) C++ Standard Libary std::range_format(3)

NAME

std::range_format - std::range_format

Synopsis

Defined in header <format> enum class range_format {

disabled, map, set, (since C++23) sequence, string, debug_string

};

Specifies how a range should be formatted.

Constants

Name Explanation disabled disallows range default formatter to format range
allows to format range as map representation with modified brackets "{", "}" map and separator ": " for underlying pair-like types in the following format:
{ key-1 : value-1, ..., key-n : value-n }
allows to format range as set representation with modified brackets "{" and set "}" in the following format:
{ key-1, ..., key-n }
allows to format range as sequence representation with default brackets "[", sequence "]" and separator ", " in the following format:
[ element-1, ..., element-n ] string allows to format range as string debug_string allows to format range as escaped string

See also

formatter defines formatting rules for a given type (C++20) (class template) format_kind selects a suited std::range_format for a range (C++23) (variable template)

2026.11.10 http://cppreference.com