# std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>::max_size

> C++ Atlas: `cppatlas.com/w/cpp/memory/scoped_allocator_adaptor/max_size` | Source: https://en.cppreference.com/w/cpp/memory/scoped_allocator_adaptor/max_size | Domain: Memory management | Standards: C++11, C++20

Reports the maximum allocation size supported by the outer allocator, by calling std::allocator_traits<OuterAlloc>::max_size(outer_allocator()).

## Official Specification Summary (cppreference)

```cpp
// Defined in header <scoped_allocator>
size_type max_size() const; // (since C++11)
```

Reports the maximum allocation size supported by the outer allocator, by calling `std::allocator_traits<OuterAlloc>::max_size(outer_allocator())`.

### Parameters

(none)

### Return value

The maximum allocation size for OuterAlloc.

### See also

- [`max_size`](https://en.cppreference.com/w/cpp/memory/allocator/max_size) (until C++20): returns the largest supported allocation size (public member function of `std::allocator<T>`)
- [`max_size`](https://en.cppreference.com/w/cpp/memory/allocator_traits/max_size) [static]: returns the maximum object size supported by the allocator (public static member function of `std::allocator_traits<Alloc>`)

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