| Richard Smith | 762bb9d | 2011-10-13 22:29:44 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s |
| Douglas Gregor | 032c869 | 2011-07-08 15:50:43 +0000 | [diff] [blame] | 2 | class A |
| 3 | { | ||||
| 4 | public: | ||||
| 5 | A() {} | ||||
| 6 | |||||
| 7 | template <class _F> | ||||
| 8 | explicit A(_F&& __f); | ||||
| 9 | |||||
| 10 | A(A&&) {} | ||||
| 11 | A& operator=(A&&) {return *this;} | ||||
| 12 | }; | ||||
| 13 | |||||
| 14 | template <class T> | ||||
| 15 | void f(T t) | ||||
| 16 | { | ||||
| 17 | A a; | ||||
| 18 | a = f(t); | ||||
| 19 | } | ||||