Title
concept map broken by N2840
Status
nad concepts
Section
[allocator.element.concepts]
Submitter
Alisdair Meredith

Created on 2009-03-19.00:00:00 last changed 164 months ago

Messages

Date: 2010-10-21.18:28:33

Proposed resolution:

Change [allocator.element.concepts]:

template <Allocator Alloc, class T, class ... Args>
  requires HasConstructor<T, Args...>
    concept_map AllocatableElement<Alloc, T, Args&&...> {
      void construct_element(Alloc& a, T* t, Args&&... args) {
        Alloc::rebind<T>(a).construct(t, forward(args)...);
      }
    }
Date: 2010-10-21.18:28:33

[ Batavia (2009-05): ]

The affected code is no longer part of the Working Draft.

Move to NAD.

Date: 2009-05-01.00:00:00

[ 2009-05-01 Daniel adds: ]

it seems to me that #1074 should be resolved as a NAD, because the current WP has already removed the previous AllocatableElement concept map. It introduced auto concept AllocatableElement instead, but as of [allocator.element.concepts]/7 this guy contains now

requires FreeStoreAllocatable<T>;
void Alloc::construct(T*, Args&&...);
Date: 2009-03-23.00:00:00

[ 2009-03-23 Pablo adds: ]

Actually, this is incorrect, N2840 says. "In section [allocator.element.concepts] paragraph 8, modify the definition of the AllocatableElement concept and eliminate the related concept map:" but then neglects to include the red-lined text of the concept map that was to be eliminated. Pete also missed this, but I caught it he asked me to review his edits. Pete's updated WP removes the concept map entirely, which was the original intent. The issue is, therefore, moot. Note, as per my presentation of N2840 in summit, construct() no longer has a default implementation. This regrettable fact was deemed (by David Abrahams, Doug, and myself) to be preferable to the complexity of providing a default implementation that would not under-constrain a more restrictive allocator (like the scoped allocators).

Date: 2009-03-19.00:00:00

p7 Allocator-related element concepts [allocator.element.concepts]

The changes to the AllocatableElement concept mean this concept_map specialization no longer matches the original concept:

template <Allocator Alloc, class T, class ... Args>
  requires HasConstructor<T, Args...>
    concept_map AllocatableElement<Alloc, T, Args&&...> {
      void construct_element(Alloc& a, T* t, Args&&... args) {
        Alloc::rebind<T>(a).construct(t, forward(args)...);
      }
    }
History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg599
2010-10-21 18:28:33adminsetmessages: + msg598
2010-10-21 18:28:33adminsetmessages: + msg597
2010-10-21 18:28:33adminsetmessages: + msg596
2009-03-19 00:00:00admincreate