Skip to content

Commit 02fe22b

Browse files
committed
[expr.const] Remove example that was made incorrect by P1937R2.
Fixes #3792.
1 parent 1eaf966 commit 02fe22b

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

source/expressions.tex

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7366,21 +7366,4 @@
73667366
is of non-volatile const-qualified integral type or of reference type.
73677367
\end{itemize}
73687368

7369-
\begin{example}
7370-
\begin{codeblock}
7371-
struct N {
7372-
constexpr N() {}
7373-
N(N const&) = delete;
7374-
};
7375-
template<typename T> constexpr void bad_assert_copyable() { T t; T t2 = t; }
7376-
using ineffective = decltype(bad_assert_copyable<N>());
7377-
// \tcode{bad_assert_copyable<N>} is not needed for constant evaluation
7378-
// (and thus not instantiated)
7379-
template<typename T> consteval void assert_copyable() { T t; T t2 = t; }
7380-
using check = decltype(assert_copyable<N>());
7381-
// error: \tcode{assert_copyable<N>} is instantiated (because it is needed for constant
7382-
// evaluation), but the attempt to copy \tcode{t} is ill-formed
7383-
\end{codeblock}
7384-
\end{example}
7385-
73867369
\indextext{expression|)}

0 commit comments

Comments
 (0)