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.
--- /dev/null
+// 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();
+}
--- /dev/null
+// 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;
+};