Skip to content

Commit 5fb4d20

Browse files
burblebeetkoeppe
authored andcommitted
LWG4144 Disallow unique_ptr<T&, D>
1 parent 7a54d69 commit 5fb4d20

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

source/memory.tex

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2084,6 +2084,14 @@
20842084
}
20852085
\end{codeblock}
20862086

2087+
\pnum
2088+
A program that instantiates the definition of \tcode{unique_ptr<T, D>}
2089+
is ill-formed if \tcode{T*} is an invalid type.
2090+
\begin{note}
2091+
This prevents the intantiation of specializations such as
2092+
\tcode{unique_ptr<T\&, D>} and \tcode{unique_ptr<int() const, D>}.
2093+
\end{note}
2094+
20872095
\pnum
20882096
The default type for the template parameter \tcode{D} is
20892097
\tcode{default_delete}. A client-supplied template argument

0 commit comments

Comments
 (0)