blob: f15c7e73df398d5654d3fbaf29d2026a7dcb2607 [file] [log] [blame]
Richard Smithad762fc2011-04-14 22:09:26 +00001// 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
12struct U { };
13namespace std {
14 char *begin(U);
15 char *end(U);
16}
17
18void f() {
19 char a[3] = { 0, 1, 2 };
20 for (auto w : a)
21 for (auto x : S())
22 for (auto y : T())
23 for (auto z : U())
24 ;
25}
26
27template<typename A>
28void g() {
29 A a[3] = { 0, 1, 2 };
30 for (auto &v : a)
31 for (auto x : S())
32 for (auto y : T())
33 for (auto z : U())
34 ;
35}