Title
Minimal allocator interface
Status
c++14
Section
[allocator.requirements]
Submitter
Jonathan Wakely

Created on 2011-06-06.00:00:00 last changed 123 months ago

Messages

Date: 2011-08-16.10:45:53

Proposed resolution:

This wording is relative to the FDIS.

  1. Modify the example in [allocator.requirements] p5 as indicated:

    -5- […]

    [ Example: the following is an allocator class template supporting the minimal interface that satisfies the requirements of Table 28:

    template <class Tp>
    struct SimpleAllocator {
      typedef Tp value_type;
      SimpleAllocator(ctor args);
      template <class T> SimpleAllocator(const SimpleAllocator<T>& other);
      Tp *allocate(std::size_t n);
      void deallocate(Tp *p, std::size_t n);
    };
    
    template <class T, class U>
    bool operator==(const SimpleAllocator<T>&, const SimpleAllocator<U>&);
    template <class T, class U>
    bool operator!=(const SimpleAllocator<T>&, const SimpleAllocator<U>&);
    

    end example ]

Date: 2011-08-16.10:45:53

[ Bloomington, 2011 ]

Move to Ready

Date: 2011-06-06.00:00:00

The example in [allocator.requirements] says SimpleAllocator satisfies the requirements of Table 28 — Allocator requirements, but it doesn't support comparison for equality/inequality.

History
Date User Action Args
2014-02-20 13:20:35adminsetstatus: wp -> c++14
2012-02-12 18:36:43adminsetstatus: voting -> wp
2012-02-09 04:07:48adminsetstatus: ready -> voting
2011-08-16 10:45:53adminsetmessages: + msg5842
2011-08-16 10:45:53adminsetstatus: new -> ready
2011-06-06 22:03:13adminsetmessages: + msg5809
2011-06-06 00:00:00admincreate