brintos

brintos / llvm-project-archived public Read only

0
0
Text · 446 B · e5b3607 Raw
22 lines · cpp
1// RUN: %clang_cc1 %s -verify2// expected-no-diagnostics3 4namespace 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 ns16 17  void g(string_view s) {18    ns::Derived d;19    f(s, &d);20  }21  } // namespace r360311_regression22