@@ -324,57 +324,6 @@ bool x = X() == X(); // expected-warning {{ambiguous}}
324
324
}
325
325
} // namespace P2468R2
326
326
327
- namespace GH53954 {
328
- namespace friend_template_1 {
329
- struct P {
330
- template <class T >
331
- friend bool operator ==(const P&, const T&); // expected-note {{candidate}} \
332
- // expected-note {{ambiguous candidate function with reversed arguments}}
333
- };
334
- struct A : public P {};
335
- struct B : public P {};
336
- bool check (A a, B b) { return a == b; } // expected-warning {{use of overloaded operator '==' (with operand types 'A' and 'B') to be ambiguous}}
337
- }
338
-
339
- namespace friend_template_2 {
340
- struct P {
341
- template <class T >
342
- friend bool operator ==(const T&, const P&); // expected-note {{candidate}} \
343
- // expected-note {{ambiguous candidate function with reversed arguments}}
344
- };
345
- struct A : public P {};
346
- struct B : public P {};
347
- bool check (A a, B b) { return a == b; } // expected-warning {{use of overloaded operator '==' (with operand types 'A' and 'B') to be ambiguous}}
348
- }
349
-
350
- namespace member_template {
351
- struct P {
352
- template <class S >
353
- bool operator ==(const S &) const ; // expected-note {{candidate}} \
354
- // expected-note {{ambiguous candidate function with reversed arguments}}
355
- };
356
- struct A : public P {};
357
- struct B : public P {};
358
- bool check (A a, B b) { return a == b; } // expected-warning {{use of overloaded operator '==' (with operand types 'A' and 'B') to be ambiguous}}
359
- }
360
-
361
- namespace non_member_template_1 {
362
- struct P {};
363
- template <class S >
364
- bool operator ==(const P&, const S &); // expected-note {{candidate}} \
365
- // expected-note {{ambiguous candidate function with reversed arguments}}
366
-
367
- struct A : public P {};
368
- struct B : public P {};
369
- bool check (A a, B b) { return a == b; } // expected-warning {{use of overloaded operator '==' (with operand types 'A' and 'B') to be ambiguous}}
370
-
371
- template <class S >
372
- bool operator !=(const P&, const S &);
373
- bool fine (A a, B b) { return a == b; } // Ok. Found a matching operator!=.
374
- }
375
- }
376
-
377
-
378
327
namespace ADL_GH68901 {
379
328
namespace test1 {
380
329
namespace A {
@@ -477,17 +426,6 @@ bool i(X x) {
477
426
} // namespace test2
478
427
} // namespace function_scope_operator_eqeq
479
428
480
- namespace non_member_template_2 {
481
- struct P {};
482
- template <class S >
483
- bool operator ==(const S&, const P&); // expected-note {{candidate}} \
484
- // expected-note {{ambiguous candidate function with reversed arguments}}
485
-
486
- struct A : public P {};
487
- struct B : public P {};
488
- bool check (A a, B b) { return a == b; } // expected-warning {{use of overloaded operator '==' (with operand types 'A' and 'B') to be ambiguous}}
489
- }
490
-
491
429
#else // NO_ERRORS
492
430
493
431
namespace problem_cases {
0 commit comments