Home | History | Annotate | Download | only in PCH
      1 // Header for PCH test cxx-for-range.cpp
      2 
      3 struct S {
      4   int *begin();
      5   int *end();
      6 };
      7 
      8 struct T { };
      9 char *begin(T);
     10 char *end(T);
     11 
     12 struct U { };
     13 namespace std {
     14   char *begin(U);
     15   char *end(U);
     16 }
     17 
     18 void 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 
     27 template<typename A>
     28 void 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 }
     36