Movatterモバイル変換


[0]ホーム

URL:



This page is a snapshot from the LWG issues list, see theLibrary Active Issues List for more information and the meaning ofC++14 status.

2320.select_on_container_copy_construction() takes allocators, not containers

Section: 23.2.2[container.requirements.general]Status:C++14Submitter: Stephan T. LavavejOpened: 2013-09-21Last modified: 2017-07-05

Priority:0

View otheractive issues in [container.requirements.general].

View all otherissues in [container.requirements.general].

View all issues withC++14 status.

Discussion:

23.2.2[container.requirements.general]/7 says "Copy constructors for these container types obtain an allocator by callingallocator_traits<allocator_type>::select_on_container_copy_construction on their first parameters." However, 20.2.9.3[allocator.traits.members]/8 says that this takesconst Alloc&, not a container. 23.2.2[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.

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

Proposed resolution:

This wording is relative to N3691.

  1. In 23.2.2[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 callingallocator_traits<allocator_type>::select_on_container_copy_construction ontheir 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. […]


[8]ページ先頭

©2009-2026 Movatter.jp