Skip to content

Commit 42e35cf

Browse files
jensmaurertkoeppe
authored andcommitted
[dcl.fct.def.delete] Adjust 'onlydouble' example. (#1950)
1 parent cc5becb commit 42e35cf

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

source/declarators.tex

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2214,12 +2214,13 @@
22142214
constitute a reference. \end{note}
22152215

22162216
\pnum
2217-
\begin{example} One can enforce non-default-initialization and non-integral
2218-
initialization with
2217+
\begin{example} One can prevent default initialization and
2218+
initialization by non-\tcode{double}s with
22192219
\begin{codeblock}
22202220
struct onlydouble {
22212221
onlydouble() = delete; // OK, but redundant
2222-
onlydouble(std::intmax_t) = delete;
2222+
template<class T>
2223+
onlydouble(T) = delete;
22232224
onlydouble(double);
22242225
};
22252226
\end{codeblock}

0 commit comments

Comments
 (0)