+2015-08-08 Jason Merrill <jason@redhat.com>
+
+ PR c++/67114
+ * call.c (joust): Only call more_constrained on decls.
+
2015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
Braden Obrzut <admin@maniacsvault.net>
Jason Merrill <jason@redhat.com>
return winner;
}
- // C++ Concepts
- // or, if not that, F1 is more constrained than F2.
- if (flag_concepts)
- {
- winner = more_constrained (cand1->fn, cand2->fn);
- if (winner)
- return winner;
- }
+ // C++ Concepts
+ // or, if not that, F1 is more constrained than F2.
+ if (flag_concepts && DECL_P (cand1->fn) && DECL_P (cand2->fn))
+ {
+ winner = more_constrained (cand1->fn, cand2->fn);
+ if (winner)
+ return winner;
+ }
/* Check whether we can discard a builtin candidate, either because we
have two identical ones or matching builtin and non-builtin candidates.
--- /dev/null
+// PR c++/67114
+// { dg-options -std=c++1z }
+
+typedef unsigned uint32_t;
+class A {
+public:
+ void operator==(A);
+ operator uint32_t() const;
+ operator int() const;
+};
+class BluetoothNamedValue {
+ bool operator==(const BluetoothNamedValue &) const;
+ A value() const;
+};
+auto BluetoothNamedValue::
+operator==(const BluetoothNamedValue &) const -> bool {
+ value() == value();
+ return true;
+}