std::chars_format(3)

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

πŸ’– NAME πŸ’–

okay so bestie, you're on the std::chars_format(3) page in the C++ Standard Libary, and the name is literally std::chars_format - std::chars_format. yes, the icon is the title, the title is the icon, periodt. πŸ‘‘βœ¨


✨ Synopsis ✨

Defined in header <charconv>

Here's the whole mood, copied exactly because we do not play with code:

          enum class chars_format {

              scientific = /*unspecified*/,
              fixed = /*unspecified*/,       (since C++17)
              hex = /*unspecified*/,
              general = fixed | scientific

          };

So it's a BitmaskType used to specify floating-point formatting for std::to_chars and std::from_chars. that's the job. it ate. πŸ’…πŸ”₯


🧠 Notes 🧠

Feature-test macro check, because we love a build-system receipt:

  • __cpp_lib_to_chars β€” value 201611L, std (C++17), feature: Elementary string conversions (std::to_chars, std::from_chars) πŸ’–

🌸 Example 🌸

This section is incomplete.

Reason: no example.

no example yet, bestie 😭 the page says it itself, and we respect the honesty. 🫢


πŸ‘€ See also πŸ‘€

  • to_chars (C++17) β€” converts an integer or floating-point value to a character sequence (function)
  • from_chars (C++17) β€” converts a character sequence to an integer or floating-point value (function)

the way these two are linked here is giving "you and your bestie in every group project" energy. πŸ’œπŸ¦‹


πŸ—‚οΈ Category πŸ—‚οΈ

  • Todo no example

source/version check: huge love to http://cppreference.com, the 2024.06.10 version, and std::chars_format(3) itself β€” byeee bestie, go format some floats responsibly πŸ’…πŸŽ€πŸŒˆ

πŸ“¦ where this page comes from