std::vector::get_allocator(3)

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

std::vector::get_allocator πŸ’–

okay bestie, welcome to the C++ Standard Libary page for std::vector::get_allocator β€” yes, that header spelling is giving vintage typo energy, but we’re keeping it exactly as it is fr fr. This one is short, sweet, and lowkey iconic: it’s all about the allocator associated with the container. πŸ’…βœ¨

🌸 NAME 🌸

std::vector::get_allocator β€” std::vector::get_allocator

✨ Synopsis ✨

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

Returns the allocator associated with the container.

πŸŽ€ Parameters πŸŽ€

(none) β€” literally nothing to pass, bestie. Not a single arg. 🫢

πŸ¦‹ Return value πŸ¦‹

The associated allocator.

⭐ Complexity ⭐

Constant.


source/version/date sign-off: big love to cppreference.com, version 2024.06.10, for the std::vector::get_allocator(3) page β€” mwah πŸ’‹

πŸ“¦ where this page comes from