3037. polymorphic_allocator and incomplete types

Section: 23.12.3 [mem.poly.allocator.class] Status: New Submitter: Casey Carter Opened: 2017-11-15 Last modified: 2017-11-29

Priority: Not Prioritized

View other active issues in [mem.poly.allocator.class].

View all other issues in [mem.poly.allocator.class].

View all issues with New status.

Discussion:

polymorphic_allocator can trivially support the allocator completeness requirements (20.5.3.5.1 [allocator.requirements.completeness]) just as does the default allocator. Doing so imposes no implementation burden, and enables pmr::forward_list, pmr::list, and pmr::vector to support incomplete types as do the non-pmr equivalents.

Proposed resolution:

Wording relative to N4700.

  1. Add a new paragraph in 23.12.3 [mem.poly.allocator.class] after para 1:

    1 A specialization of class template pmr::polymorphic_allocator conforms to the Allocator requirements [...]

    -?- All specializations of class template pmr::polymorphic_allocator satisfy the allocator completeness requirements (20.5.3.5.1 [allocator.requirements.completeness]).