std::experi...ng_view::at(3)

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

πŸ’– NAME πŸ’–

hi bestie, welcome to std::experi...ng_view::at(3) β€” that's the page from the C++ Standard Libary manual, and the actual name is std::experimental::basic_string_view::at β€” std::experimental::basic_string_view::at. yes, she says it twice, it's iconic, we respect it. πŸ‘‘


✨ Synopsis ✨

okay so the signature is literally this, no cap:

constexpr const_reference at(size_type pos) const;

and the synopsis tags it with (library fundamentals TS). πŸ’…

This one returns a reference to the character at specified location pos. Bounds checking is performed β€” yes, she checks β€” and an exception of type std::out_of_range will be thrown on invalid access. 🫢


πŸŽ€ Parameters πŸŽ€

  • pos β€” position of the character to return. that's it, that's the parameter. 🌸

🌸 Return value 🌸

Reference to the requested character. the character you asked for, periodt. ✨


πŸ”₯ Exceptions πŸ”₯

Throws std::out_of_range if pos >= size(). like, if you reach past the end, she will not be quiet about it. 😭


⭐ Complexity ⭐

Constant.


πŸ¦‹ See also πŸ¦‹

  • operator[] β€” access specified character (public member function)

🏷️ Category 🏷️

  • Noindexed pages

okay that's the whole page, bestie β€” source/version + date: http://cppreference.com, 2024.06.10. and yep, the footer still says std::experi...ng_view::at(3). mwah πŸ’‹πŸŽ€

πŸ“¦ where this page comes from