File tree Expand file tree Collapse file tree 1 file changed +0
-17
lines changed Expand file tree Collapse file tree 1 file changed +0
-17
lines changed Original file line number Diff line number Diff line change 7366
7366
is of non-volatile const-qualified integral type or of reference type.
7367
7367
\end {itemize }
7368
7368
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
-
7386
7369
\indextext {expression|)}
You can’t perform that action at this time.
0 commit comments