clang/test/CXX/over/over.match/over.match.funcs/over.match.ref/p1.cpp
raw| 1 | // RUN: %clang_cc1 %s -verify |
| 2 | // expected-no-diagnostics |
| 3 | |
| 4 | namespace r360311_regression { |
| 5 | struct string {}; |
| 6 | struct string_view { |
| 7 | explicit operator string() const; |
| 8 | }; |
| 9 | |
| 10 | namespace ns { |
| 11 | struct Base {}; |
| 12 | class Derived : public Base {}; |
| 13 | void f(string_view s, Base *c); |
| 14 | void f(const string &s, Derived *c); |
| 15 | } // namespace ns |
| 16 | |
| 17 | void g(string_view s) { |
| 18 | ns::Derived d; |
| 19 | f(s, &d); |
| 20 | } |
| 21 | } // namespace r360311_regression |