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