Skip to content

Commit bd004f4

Browse files
committed
P2875R4 Undeprecate polymorphic_allocator::destroy
1 parent fa7c7e5 commit bd004f4

File tree

3 files changed

+19
-30
lines changed

3 files changed

+19
-30
lines changed

source/future.tex

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1383,35 +1383,6 @@
13831383
is the same as the value of the \libheader{cerrno} macro
13841384
shown in the above synopsis.
13851385

1386-
\rSec1[depr.mem.poly.allocator.mem]{Deprecated \tcode{polymorphic_allocator} member function}
1387-
1388-
\pnum
1389-
The following member is declared in addition to those members
1390-
specified in \ref{mem.poly.allocator.mem}:
1391-
1392-
\begin{codeblock}
1393-
namespace std::pmr {
1394-
template<class Tp = byte>
1395-
class polymorphic_allocator {
1396-
public:
1397-
template <class T>
1398-
void destroy(T* p);
1399-
};
1400-
}
1401-
\end{codeblock}
1402-
1403-
\indexlibrarymember{destroy}{polymorphic_allocator}%
1404-
\begin{itemdecl}
1405-
template<class T>
1406-
void destroy(T* p);
1407-
\end{itemdecl}
1408-
1409-
\begin{itemdescr}
1410-
\pnum
1411-
\effects
1412-
As if by \tcode{p->\~T()}.
1413-
\end{itemdescr}
1414-
14151386
\rSec1[depr.meta.types]{Deprecated type traits}
14161387

14171388
\pnum

source/memory.tex

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5813,6 +5813,9 @@
58135813
template<class T, class... Args>
58145814
void construct(T* p, Args&&... args);
58155815

5816+
template <class T>
5817+
void destroy(T* p);
5818+
58165819
polymorphic_allocator select_on_container_copy_construction() const;
58175820

58185821
memory_resource* resource() const;
@@ -6023,7 +6026,7 @@
60236026
\effects
60246027
Equivalent to:
60256028
\begin{codeblock}
6026-
allocator_traits<polymorphic_allocator>::destroy(*this, p);
6029+
destroy(p);
60276030
deallocate_object(p);
60286031
\end{codeblock}
60296032
\end{itemdescr}
@@ -6053,6 +6056,18 @@
60536056
Nothing unless the constructor for \tcode{T} throws.
60546057
\end{itemdescr}
60556058

6059+
\indexlibrarymember{destroy}{polymorphic_allocator}%
6060+
\begin{itemdecl}
6061+
template<class T>
6062+
void destroy(T* p);
6063+
\end{itemdecl}
6064+
6065+
\begin{itemdescr}
6066+
\pnum
6067+
\effects
6068+
Equivalent to \tcode{p->\~T()}.
6069+
\end{itemdescr}
6070+
60566071
\indexlibrarymember{select_on_container_copy_construction}{polymorphic_allocator}%
60576072
\begin{itemdecl}
60586073
polymorphic_allocator select_on_container_copy_construction() const;

source/xrefdelta.tex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@
4848
% https://github.com/cplusplus/draft/pull/6255
4949
\movedxref{container.gen.reqmts}{container.requirements.general}
5050

51+
% P2875 Undeprecate polymorphic_allocator::destroy
52+
\movedxref{depr.mem.poly.allocator.mem}{mem.poly.allocator.mem}
53+
5154
% https://github.com/cplusplus/draft/pull/6653
5255
\movedxref{mismatch}{alg.mismatch}
5356

0 commit comments

Comments
 (0)