unresolved-construct.cpp 277 B

1234567891011121314151617181920
  1. // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
  2. // expected-no-diagnostics
  3. class A
  4. {
  5. public:
  6. A() {}
  7. template <class _F>
  8. explicit A(_F&& __f);
  9. A(A&&) {}
  10. A& operator=(A&&) {return *this;}
  11. };
  12. template <class T>
  13. void f(T t)
  14. {
  15. A a;
  16. a = f(t);
  17. }