std::basic_...t_allocator(3)

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

πŸ’– NAME πŸ’–

okay so std::basic_string::get_allocator β€” std::basic_string::get_allocator. Yes bestie, the NAME section said it twice, and honestly? Main character energy. πŸ’…

This page is from the C++ Standard Libary manual, section 3 β€” the header squishes the title into std::basic_...t_allocator(3), but we all know it's the get_allocator page. Slay. ✨

πŸŽ€ Synopsis πŸŽ€

Here's the exact signature, bestie β€” no autocorrect, no vibes-based edits, fr fr:

allocator_type get_allocator() const;  (noexcept since C++20)
                                       (constexpr since C++20)

It returns the allocator associated with the string. That's the whole plot. 🫢

🫢 Parameters 🫢

(none) β€” zero, zilch, no arguments, not even a little one. It's giving minimalist. πŸ™ˆ

✨ Return value ✨

The associated allocator. That's it. That's the return value. Obsessed. πŸ’–

⚑ Complexity ⚑

Constant. Periodt. No cap. πŸ’…

πŸ‘€ See also πŸ‘€

  • allocator β€” the default allocator (class template)
  • allocator_traits (C++11) β€” provides information about allocator types (class template)
  • uses_allocator (C++11) β€” checks if the specified type supports uses-allocator construction (class template)

This came from http://cppreference.com, dated 2024.06.10, and the footer tag is std::basic_...t_allocator(3). Mwah, bye bestie β€” go get that allocator! πŸ’‹βœ¨

πŸ“¦ where this page comes from