From Jason Turner

[mem.poly.allocator.class.general]

Diff to HTML by rtfpessoa

tmp/tmphuah9jjk/{from.md → to.md} RENAMED
@@ -33,23 +33,26 @@ namespace std::pmr {
33
  polymorphic_allocator(const polymorphic_allocator<U>& other) noexcept;
34
 
35
  polymorphic_allocator& operator=(const polymorphic_allocator&) = delete;
36
 
37
  // [mem.poly.allocator.mem], member functions
38
- [[nodiscard]] Tp* allocate(size_t n);
39
  void deallocate(Tp* p, size_t n);
40
 
41
- [[nodiscard]] void* allocate_bytes(size_t nbytes, size_t alignment = alignof(max_align_t));
42
  void deallocate_bytes(void* p, size_t nbytes, size_t alignment = alignof(max_align_t));
43
- template<class T> [[nodiscard]] T* allocate_object(size_t n = 1);
44
  template<class T> void deallocate_object(T* p, size_t n = 1);
45
- template<class T, class... CtorArgs> [[nodiscard]] T* new_object(CtorArgs&&... ctor_args);
46
  template<class T> void delete_object(T* p);
47
 
48
  template<class T, class... Args>
49
  void construct(T* p, Args&&... args);
50
 
 
 
 
51
  polymorphic_allocator select_on_container_copy_construction() const;
52
 
53
  memory_resource* resource() const;
54
 
55
  // friends
 
33
  polymorphic_allocator(const polymorphic_allocator<U>& other) noexcept;
34
 
35
  polymorphic_allocator& operator=(const polymorphic_allocator&) = delete;
36
 
37
  // [mem.poly.allocator.mem], member functions
38
+ Tp* allocate(size_t n);
39
  void deallocate(Tp* p, size_t n);
40
 
41
+ void* allocate_bytes(size_t nbytes, size_t alignment = alignof(max_align_t));
42
  void deallocate_bytes(void* p, size_t nbytes, size_t alignment = alignof(max_align_t));
43
+ template<class T> T* allocate_object(size_t n = 1);
44
  template<class T> void deallocate_object(T* p, size_t n = 1);
45
+ template<class T, class... CtorArgs> T* new_object(CtorArgs&&... ctor_args);
46
  template<class T> void delete_object(T* p);
47
 
48
  template<class T, class... Args>
49
  void construct(T* p, Args&&... args);
50
 
51
+ template<class T>
52
+ void destroy(T* p);
53
+
54
  polymorphic_allocator select_on_container_copy_construction() const;
55
 
56
  memory_resource* resource() const;
57
 
58
  // friends