summaryrefslogtreecommitdiffstats
path: root/test/CXX/expr/expr.prim/expr.prim.lambda/p15.cpp
blob: b4b1605ab0025e4be6f55c324a8b203cceb7f6ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// RUN: %clang_cc1 -fsyntax-only -std=c++11 %s -verify
// expected-no-diagnostics

class NonCopyable {
  NonCopyable(const NonCopyable&);
};

void capture_by_ref(NonCopyable nc, NonCopyable &ncr) {
  int array[3];
  (void)[&nc] () -> void {};
  (void)[&ncr] () -> void {}; 
  (void)[&array] () -> void {};
}
OpenPOWER on IntegriCloud