llvm-project/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp

7 lines
318 B
C++
Raw Normal View History

// RUN: %clang_cc1 -std=c++11 %s -verify
int test_default_args() {
(void)[](int i = 5, // expected-error{{default arguments can only be specified for parameters in a function declaration}}
int j = 17) {}; // expected-error{{default arguments can only be specified for parameters in a function declaration}}
}