Skip to content

Commit 5a38fd9

Browse files
authored
Merge 2024-03 LWG Motion 2
P2875R4 Undeprecate polymorphic_allocator::destroy
2 parents 17836b7 + 35c2ff6 commit 5a38fd9

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
@@ -1384,35 +1384,6 @@
13841384
is the same as the value of the \libheader{cerrno} macro
13851385
shown in the above synopsis.
13861386

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

14181389
\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)