This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Dup status.

### 1375. `reference_type` should not have been removed from the allocator requirements

Section: 16.4.4.6 [allocator.requirements] Status: Dup Submitter: INCITS Opened: 2010-08-25 Last modified: 2016-01-28

Priority: Not Prioritized

View other active issues in [allocator.requirements].

View all other issues in [allocator.requirements].

View all issues with Dup status.

Duplicate of: 1318

Discussion:

Addresses US-87

`reference_type` should not have been removed from the allocator requirements. Even if it is always the same as `value_type&`, it is an important customization point for extensions and future features.

Proposed resolution:

In [allocator.requirements] Table 42 - Allocotor Requirements, Add a row (after `value_type`) with columns:

> Expression: `X::reference_type`
> Return type: `T&`
> Assertion/note...: (empty)
> Default: `T&`

[allocator.traits]:

>     namespace std {
>       template <class Alloc> struct allocator_traits {
>         typedef Alloc allocator_type;

>         typedef typename Alloc::value_type value_type;

>         typedef see below   pointer;
>         typedef see below   const_pointer;
>         typedef see below   void_pointer;
>         typedef see below   const_void_pointer;
>         typedef value_type& reference_type;

Add `reference_type` to allocator_traits template, defaulted to value_type&.