@@ -1037,7 +1037,7 @@ void test() {
10371037
10381038namespace GH66612 {
10391039 template <typename C>
1040- auto end (C c) ->int;
1040+ auto end (C c) ->int; // expected-note {{possible target for call}}
10411041
10421042 template <typename T>
10431043 concept Iterator = true ;
@@ -1047,9 +1047,8 @@ namespace GH66612 {
10471047 { end } -> Iterator; // #66612GH_END
10481048 };
10491049
1050- static_assert (Container<int >);// expected-error{{static assertion failed}}
1051- // expected-note@-1{{because 'int' does not satisfy 'Container'}}
1052- // expected-note@#66612GH_END{{because 'end' would be invalid: reference to overloaded function could not be resolved; did you mean to call it?}}
1050+ static_assert (Container<int >);
1051+ // expected-error@#66612GH_END{{reference to overloaded function could not be resolved; did you mean to call it?}}
10531052}
10541053
10551054namespace GH66938 {
@@ -1407,7 +1406,6 @@ static_assert(!std::is_constructible_v<span<4>, array<int, 3>>);
14071406
14081407}
14091408
1410-
14111409namespace GH162125 {
14121410template <typename , int size>
14131411concept true_int = (size, true );
@@ -1444,3 +1442,37 @@ struct s {
14441442
14451443void (*test)(int ) = &s<bool >::f<int >;
14461444}
1445+ namespace GH51246 {
1446+ void f (); // expected-note {{possible target for call}}
1447+ void f (int ); // expected-note {{possible target for call}}
1448+ void g ();
1449+ static_assert (requires { f; }); // expected-error {{reference to overloaded function could not be resolved}}
1450+ static_assert (requires { g; });
1451+ struct S {
1452+ void mf () {
1453+ static_assert (requires { mf (); });
1454+ static_assert (requires { mf; }); // expected-error {{reference to non-static member function must be called}}
1455+ static_assert (requires { S::mf; }); // expected-error {{reference to non-static member function must be called}}
1456+ }
1457+ void mf2 (int ); // expected-note 2{{possible target for call}}
1458+ void mf2 () { // expected-note 2{{possible target for call}}
1459+ static_assert (requires { mf2; }); // expected-error {{reference to non-static member function must be called}}
1460+ static_assert (requires { S::mf2; }); // expected-error {{reference to non-static member function must be called}}
1461+ }
1462+ };
1463+
1464+ } // namespace GH51246
1465+
1466+
1467+ namespace GH97753 {
1468+
1469+ void f (); // expected-note {{possible target for call}}
1470+ void f (int ); // expected-note {{possible target for call}}
1471+
1472+ template <typename T>
1473+ concept C = sizeof (T) == 42 ;
1474+
1475+ static_assert ( requires {{ &f } -> C;} ); // expected-error {{reference to overloaded function could not be resolved;}}
1476+ // expected-error@-1 {{static assertion failed due to requirement 'requires { { &f() } -> C; }'}}
1477+
1478+ }
0 commit comments