1// Header for PCH test cxx-for-range.cpp
2
3struct S {
4  int *begin();
5  int *end();
6};
7
8struct T { };
9char *begin(T);
10char *end(T);
11
12namespace NS {
13  struct U { };
14  char *begin(U);
15  char *end(U);
16}
17using NS::U;
18
19void f() {
20  char a[3] = { 0, 1, 2 };
21  for (auto w : a)
22    for (auto x : S())
23      for (auto y : T())
24        for (auto z : U())
25          ;
26}
27
28template<typename A>
29void g() {
30  A a[3] = { 0, 1, 2 };
31  for (auto &v : a)
32    for (auto x : S())
33      for (auto y : T())
34        for (auto z : U())
35          ;
36}
37