# std::vector<T,Allocator>::get_allocator

> C++ Atlas: `cppatlas.com/w/cpp/container/vector/get_allocator` | Source: https://en.cppreference.com/w/cpp/container/vector/get_allocator | Domain: Containers | Standards: C++11, C++20

Returns the allocator associated with the container.

## Official Specification Summary (cppreference)

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

Returns the allocator associated with the container.

### Parameters

(none)

### Return value

The associated allocator.

### Complexity

Constant.

---
Attribution: content from https://en.cppreference.com/w/cpp/container/vector/get_allocator (cppreference.com), licensed under CC-BY-SA 3.0 and GFDL. Modified: converted to markdown, study notes added. Offline snapshot of 9 February 2025.