forked from wangliu-iscas/gcc-patch
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
c++: add fixed testcases [PR98614, PR104802]
Tested on x86_64-pc-linux-gnu, pushed to trunk. -- >8 -- Both of these PRs are fixed by r12-1403-gc4e50e500da7692a. PR c++/98614 PR c++/104802 gcc/testsuite/ChangeLog: * g++.dg/cpp1z/nontype-auto22.C: New test. * g++.dg/cpp2a/concepts-partial-spec14.C: New test.
- Loading branch information
1 parent
c2d62cd
commit d88e2f7
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// PR c++/104802 | ||
// { dg-do compile { target c++17 } } | ||
|
||
template<auto const& ... Args> | ||
struct S { | ||
template<typename=void> | ||
void operator()() const {} | ||
}; | ||
|
||
struct weird_ { | ||
int operator&() const { return 123; } | ||
} const weird {}; | ||
|
||
int main() { | ||
S<weird> s {}; | ||
s(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// PR c++/98614 | ||
// { dg-do compile { target c++20 } } | ||
|
||
template<class T> | ||
struct A; | ||
|
||
template<class T> requires true | ||
struct A<T> { | ||
A(A<T> const&) = default; | ||
}; |