aboutsummaryrefslogtreecommitdiff
path: root/test/CXX/expr/expr.prim/expr.prim.lambda/generic-lambda-unimplemented-1y.cpp
blob: 7f42c396ee2254312cf25ebfdbfd0ff284194907 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// RUN: %clang_cc1 -fsyntax-only -std=c++1y %s -verify
//expected-no-diagnostics
namespace lambda_capturing {
// FIXME: Once return type deduction is implemented for generic lambdas
// this will need to be updated.
void test() {
  int i = 10;
  {
    auto L = [=](auto a) -> int { 
      return i + a;
    };
    L(3);
  }
  {
    auto L = [i](auto a) -> int { 
      return i + a;
    };
    L(3);
  }  
  {
    auto L = [i=i](auto a) -> int { 
      return i + a;
    };
    L(3);
  }  

  
}

}