std::extents::index-cast(3)

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

πŸ’– std::extents::index-cast(3) πŸ’–

okay so bestie, welcome to std::extents::index-cast(3) from the C++ Standard Libary β€” that's the manual name, and yes it's spelled exactly like that. This page is short but it's giving C++23 template energy, so let's go ✨🫢

🌸 NAME 🌸

  • std::extents::index-cast β€” std::extents::index-cast πŸ’…

✨ Synopsis ✨

No cap, the whole synopsis is this exact code:

          template< class OtherIndexType >
       (since C++23)
          static constexpr auto /*index-cast*/( OtherIndexType&& i )
       (exposition only*)
          noexcept;

It casts the index i in type OtherIndexType into a certain integral type. It is equivalent to:

  • return i;, if OtherIndexType is an integral type other than bool, and
  • return static_cast<index_type>(i); otherwise.
lowkey important: the exposition only* bit stays exactly as written, bestie. Don't come for me. πŸ™ˆ

πŸ“ Parameters πŸ“

  • i β€” the index to be cast. That's it, that's the parameter. 🫢

πŸ‘‘ Return value πŸ‘‘

Cast index. Yep, literally the cast index. Slay.

πŸ¦‹ Notes πŸ¦‹

This section is incomplete. That's all it says. 😭

🌈 Example 🌈

This section is incomplete.

Reason: no example. Not me being left with no example 😭

🧚 See also 🧚

This section is incomplete.

πŸŽ€ Categories πŸŽ€

  • Todo without reason
  • Todo no example

πŸ’Œ source: http://cppreference.com Β· version/date: 2024.06.10 Β· this is std::extents::index-cast(3), and that's the cute sign-off, bye bestie πŸ«ΆπŸ’…
πŸ“¦ where this page comes from