* auto-profile.c (afdo_annotate_cfg): Use update_max_bb_count.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1y / lambda-deduce-mult.C
blobf1c7ba9482594a69c2bb775a06f5df1d552b3d73
1 // Testcase for an extension to allow return type deduction when the lambda
2 // contains more than just a single return-statement.
4 // { dg-do run { target c++14 } }
6 bool b;
7 template <class T>
8 T f (T t)
10   return [=] {
11     auto i = t+1;
12     if (b)
13       return i+1;
14     else
15       return i+1;
16   }();
19 int main()
21   // Pointless, but well-formed.
22   [] { return 1; return 2; }();
24   if (f(1) != 3)
25     return 1;