2284. Inconsistency in allocator_traits::max_size

Section: 23.10.9 [allocator.traits] Status: C++14 Submitter: Marshall Clow Opened: 2013-08-27 Last modified: 2016-02-10

Priority: Not Prioritized

View all issues with C++14 status.

Discussion:

Section 23.10.9 [allocator.traits] says:

static size_type max_size(const Alloc& a) noexcept;

Section 23.10.9.2 [allocator.traits.members] says:

static size_type max_size(Alloc& a) noexcept;

These should be the same.

Discussion:

Pablo (who I believe wrote the allocator_traits proposal) says "The function should take a const reference."

[2013-09 Chicago]

No objections, so moved to Immediate.

Accept for Working Paper

Proposed resolution:

This wording is relative to N3691.

  1. Change 23.10.9.2 [allocator.traits.members] as follows:

    static size_type max_size(const Alloc& a) noexcept;