Douglas Gregor | e31e606 | 2012-02-07 10:09:13 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -std=c++11 %s -verify |
| 2 | |
| 3 | class NonCopyable { |
| 4 | NonCopyable(const NonCopyable&); |
| 5 | }; |
| 6 | |
| 7 | void capture_by_ref(NonCopyable nc, NonCopyable &ncr) { |
Douglas Gregor | 199cec7 | 2012-02-09 02:45:47 +0000 | [diff] [blame] | 8 | int array[3]; |
Douglas Gregor | 656bc62 | 2012-02-09 08:26:42 +0000 | [diff] [blame^] | 9 | (void)[&nc] () -> void {}; |
| 10 | (void)[&ncr] () -> void {}; |
| 11 | (void)[&array] () -> void {}; |
Douglas Gregor | e31e606 | 2012-02-07 10:09:13 +0000 | [diff] [blame] | 12 | } |