comparison gcc/testsuite/g++.dg/cpp1y/lambda-generic-ice10.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
1 // PR c++/89522
2 // { dg-do compile { target c++14 } }
3
4 template <typename F>
5 void foo (F f)
6 {
7 f (1);
8 }
9 template <typename T>
10 void bar (T)
11 {
12 auto f = [&](auto i) { if (f); }; // { dg-error "use of .f. before deduction of .auto." }
13 foo (f);
14 }
15 int main ()
16 {
17 bar (0);
18 }