std::range_format(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

🌸 NAME 🌸

okay so bestie, this is the manual page for std::range_format β€” and yes, it's literally std::range_format doing std::range_format things πŸ’…. It lives in the C++ Standard Libary (their spelling, not mine 😭) and the manpage is std::range_format(3), periodt.

✨ 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. That's the whole vibe check: this enum tells you how a range gets formatted 🫢.

πŸŽ€ the constants, explained πŸŽ€

  • disabled β€” disallows the range default formatter to format the range. nope, not today πŸ™ˆ.
  • map β€” allows formatting the range as a map representation with modified brackets "{", "}" and separator ": " for underlying pair-like types, in the following format: { key-1 : value-1, ..., key-n : value-n } πŸ”₯.
  • set β€” allows formatting the range as a set representation with modified brackets "{" and "}" in the following format: { key-1, ..., key-n } ✨.
  • sequence β€” allows formatting the range as a sequence representation with default brackets "[", "]" and separator ", " in the following format: [ element-1, ..., element-n ] 🌈.
  • string β€” allows formatting the range as a string πŸŽ€.
  • debug_string β€” allows formatting the range as an 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).

mwah πŸ’– source/version is http://cppreference.com, dated 2024.06.10, and this iconic little page is std::range_format(3) β€” slay, bye bestie πŸ¦‹.

πŸ“¦ where this page comes from