Files
clang-p2996/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p15.cpp
Douglas Gregor 199cec7673 Implement capture-by-copy for arrays in lambdas.
llvm-svn: 150138
2012-02-09 02:45:47 +00:00

13 lines
466 B
C++

// RUN: %clang_cc1 -fsyntax-only -std=c++11 %s -verify
class NonCopyable {
NonCopyable(const NonCopyable&);
};
void capture_by_ref(NonCopyable nc, NonCopyable &ncr) {
int array[3];
(void)[&nc] () -> void {}; // expected-error{{lambda expressions are not supported yet}}
(void)[&ncr] () -> void {}; // expected-error{{lambda expressions are not supported yet}}
(void)[&array] () -> void {}; // expected-error{{lambda expressions are not supported yet}}
}