Skip to content

Commit

Permalink
c++: add fixed testcases [PR98614, PR104802]
Browse files Browse the repository at this point in the history
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
Patrick Palka authored and ouuleilei-bot committed Nov 16, 2023
1 parent c2d62cd commit d88e2f7
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
17 changes: 17 additions & 0 deletions gcc/testsuite/g++.dg/cpp1z/nontype-auto22.C
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();
}
10 changes: 10 additions & 0 deletions gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec14.C
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;
};

0 comments on commit d88e2f7

Please sign in to comment.