1 // { dg-do compile { target c++11 } } 2 3 struct proxy {}; 4 5 struct iterator 6 { 7 proxy operator*() { return proxy(); } 8 }; 9 10 //#define DEACTIVATE 11 12 #ifndef DEACTIVATE 13 template<typename T = int> 14 #endif foo(iterator it)15void foo(iterator it) 16 { 17 auto&& x = *it; 18 } 19 main()20int main() 21 { 22 iterator it; 23 foo(it); 24 } 25