2 // { dg-require-effective-target c++11 }
4 template <class Iterator, class Func>
5 void for_each(const Iterator first, const Iterator last, Func func)
7 for (Iterator it = first; it != last; ++it) {
15 typedef typename T::size_type type;
21 typedef typename T::size_type type;
27 typedef typename T::size_type type;
34 typedef int size_type;
39 int arr[] = { 1, 2, 3 };
40 for_each(arr, arr + 3, [&](helper<foo>::type i) {
41 for_each(arr, arr + 3, [&](helper<decltype(foo_)>::type j) { });