diff options
Diffstat (limited to 'test/CXX/expr/expr.prim/expr.prim.lambda')
-rw-r--r-- | test/CXX/expr/expr.prim/expr.prim.lambda/blocks.mm | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/CXX/expr/expr.prim/expr.prim.lambda/blocks.mm b/test/CXX/expr/expr.prim/expr.prim.lambda/blocks.mm index 0c3fdb2d80..6a6e0d9c90 100644 --- a/test/CXX/expr/expr.prim/expr.prim.lambda/blocks.mm +++ b/test/CXX/expr/expr.prim/expr.prim.lambda/blocks.mm @@ -86,3 +86,24 @@ namespace overloading { int &ir = accept_lambda_conv([](int x) { return x + 1; }); } } + +namespace PR13117 { + struct A { + template<typename ... Args> static void f1() + { + (void)^(Args args) { // expected-error{{block contains unexpanded parameter pack 'Args'}} + }; + } + + template<typename ... Args> static void f2() + { + (void)[](Args args) { // expected-error{{lambda contains unexpanded parameter pack 'Args'}} + }; + } + }; + + void g() { + A::f1<int, int>(); + A::f2<int, int>(); + } +} |