aboutsummaryrefslogtreecommitdiff
path: root/test/CXX/expr/expr.prim/expr.prim.lambda/blocks.mm
diff options
context:
space:
mode:
Diffstat (limited to 'test/CXX/expr/expr.prim/expr.prim.lambda/blocks.mm')
-rw-r--r--test/CXX/expr/expr.prim/expr.prim.lambda/blocks.mm19
1 files changed, 18 insertions, 1 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 6a6e0d9c90..0db2bf5646 100644
--- a/test/CXX/expr/expr.prim/expr.prim.lambda/blocks.mm
+++ b/test/CXX/expr/expr.prim/expr.prim.lambda/blocks.mm
@@ -89,6 +89,8 @@ namespace overloading {
namespace PR13117 {
struct A {
+ template<typename ... Args> static void f(Args...);
+
template<typename ... Args> static void f1()
{
(void)^(Args args) { // expected-error{{block contains unexpanded parameter pack 'Args'}}
@@ -97,9 +99,24 @@ namespace PR13117 {
template<typename ... Args> static void f2()
{
- (void)[](Args args) { // expected-error{{lambda contains unexpanded parameter pack 'Args'}}
+ // FIXME: Allow this.
+ f(
+ ^(Args args) // expected-error{{block contains unexpanded parameter pack 'Args'}}
+ { }
+ ... // expected-error{{pack expansion does not contain any unexpanded parameter packs}}
+ );
+ }
+
+ template<typename ... Args> static void f3()
+ {
+ (void)[](Args args) { // expected-error{{expression contains unexpanded parameter pack 'Args'}}
};
}
+
+ template<typename ... Args> static void f4()
+ {
+ f([](Args args) { } ...);
+ }
};
void g() {