c++: add fixed test [PR94231]
I was suprised to find out that r14-8759 fixed this accepts-invalid. clang version 17.0.6 rejects the test as well; clang version 19.0.0git crashes for which I opened <https://github.com/llvm/llvm-project/issues/80869>. PR c++/94231 gcc/testsuite/ChangeLog: * g++.dg/cpp0x/deleted17.C: New test.
This commit is contained in:
parent
8ec2f1922a
commit
1befe47f64
1 changed files with 20 additions and 0 deletions
20
gcc/testsuite/g++.dg/cpp0x/deleted17.C
Normal file
20
gcc/testsuite/g++.dg/cpp0x/deleted17.C
Normal file
|
@ -0,0 +1,20 @@
|
|||
// PR c++/94231
|
||||
// { dg-do compile { target c++11 } }
|
||||
|
||||
struct F {F(F&&)=delete;};
|
||||
|
||||
template<int=0>
|
||||
struct M {
|
||||
F f;
|
||||
M();
|
||||
M(const M&);
|
||||
M(M&&);
|
||||
};
|
||||
|
||||
template<int I>
|
||||
M<I>::M(M&&)=default; // { dg-error "use of deleted function" }
|
||||
|
||||
M<> f() {
|
||||
M<> m;
|
||||
return m;
|
||||
}
|
Loading…
Add table
Reference in a new issue