c++: Add testcase for already fixed PR [PR85493]
The a1 and a2 case were fixed (by diagnosing the invalid expression) with r11-434, and the a3 case with r8-7625. PR c++/85493 gcc/testsuite/ChangeLog: * g++.dg/cpp0x/decltype80.C: New test.
This commit is contained in:
parent
d34cdec567
commit
e74d764e17
1 changed files with 16 additions and 0 deletions
16
gcc/testsuite/g++.dg/cpp0x/decltype80.C
Normal file
16
gcc/testsuite/g++.dg/cpp0x/decltype80.C
Normal file
|
@ -0,0 +1,16 @@
|
|||
// PR c++/85493
|
||||
// { dg-do compile { target c++11 } }
|
||||
|
||||
struct no_def {
|
||||
no_def() = delete;
|
||||
};
|
||||
|
||||
template<class...>
|
||||
int foo() = delete;
|
||||
|
||||
template<class>
|
||||
void test() {
|
||||
decltype(no_def()) a1; // { dg-error "deleted" }
|
||||
decltype(no_def(1,2,3)) a2; // { dg-error "no match" }
|
||||
decltype(foo<>()) a3; // { dg-error "deleted" }
|
||||
}
|
Loading…
Add table
Reference in a new issue