2 // { dg-do compile { target c++11 } }
3 // { dg-options "-Wrange-loop-construct" }
10 S& operator=(const S&) { return *this; };
14 for (const auto r : arr)
23 S& operator=(const S&) { return *this; };
27 for (const auto r : arr) // { dg-warning "creates a copy" }
36 S& operator=(const S&) { return *this; };
41 for (const auto r : arr) // { dg-warning "creates a copy" }
50 S& operator=(const S&) { return *this; };
55 for (const auto r : arr) // { dg-warning "creates a copy" }