@@ -14812,6 +14812,7 @@ tsubst_function_decl (tree t, tree args, tsubst_flags_t complain,
if (DECL_SECTION_NAME (t))
set_decl_section_name (r, t);
if (DECL_DEFAULTED_OUTSIDE_CLASS_P (r)
+ && COMPLETE_TYPE_P (DECL_CONTEXT (r))
&& !processing_template_decl)
defaulted_late_check (r);
new file mode 100644
@@ -0,0 +1,11 @@
+// PR c++/110084
+// { dg-do compile { target c++20 } }
+
+template <class T>
+class BadTuple {
+ constexpr bool operator==(const BadTuple&) const;
+};
+template<class T>
+constexpr bool BadTuple<T>::operator==(const BadTuple<T>&) const = default;
+
+BadTuple<int> a;
@@ -5,7 +5,7 @@ template<auto V>
struct A {};
struct B {
- constexpr auto operator<=>(const B&) const = default; // { dg-error "" }
+ constexpr auto operator<=>(const B&) const = default; // { dg-error "strong_ordering" }
int value;
};