1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
// PR c++/57243 // { dg-require-effective-target c++11 } struct snarf { template <class T> void get() {} }; template <class T> struct container { snarf * begin() { return nullptr; } snarf * end() { return nullptr; } }; template <class T> void foo() { container<int> arr; for( auto i : arr ) i.get<int>(); } int main() { return 0; }