Title
select_on_container_copy_construction() takes allocators, not containers
Status
c++14
Section
[container.requirements.general]
Submitter
Stephan T. Lavavej

Created on 2013-09-21.00:00:00 last changed 131 months ago

Messages

Date: 2014-02-13.15:14:54

Proposed resolution:

This wording is relative to N3691.

  1. In [container.requirements.general]/7 change as indicated:

    -7- Unless otherwise specified, all containers defined in this clause obtain memory using an allocator (see 17.6.3.5). Copy constructors for these container types obtain an allocator by calling allocator_traits<allocator_type>::select_on_container_copy_construction on their first parametersthe allocator belonging to the container being copied. Move constructors obtain an allocator by move construction from the allocator belonging to the container being moved. […]

Date: 2014-02-13.15:14:54

[ Issaquah 2014-02-11: Move to Immediate ]

Date: 2013-09-21.00:00:00

[container.requirements.general]/7 says "Copy constructors for these container types obtain an allocator by calling allocator_traits<allocator_type>::select_on_container_copy_construction on their first parameters." However, [allocator.traits.members]/8 says that this takes const Alloc&, not a container. [container.requirements.general]/7 goes on to say "Move constructors obtain an allocator by move construction from the allocator belonging to the container being moved." so we can follow that wording.

History
Date User Action Args
2014-02-27 17:03:20adminsetstatus: wp -> c++14
2014-02-20 13:52:38adminsetstatus: immediate -> wp
2014-02-13 15:14:54adminsetmessages: + msg6842
2014-02-13 15:14:54adminsetstatus: new -> immediate
2013-10-11 19:23:41adminsetmessages: + msg6708
2013-09-21 00:00:00admincreate