kangaroo.cpp:5:10: error: 'ranges' has not been declared
5 | template<ranges::range R>
| ^~~~~~
kangaroo.cpp:5:24: error: expected '>' before 'R'
5 | template<ranges::range R>
| ^
kangaroo.cpp:6:33: error: 'R' has not been declared
6 | istream& operator>>(istream &s, R &&v) { for (auto &x : v) s >> x; return s; }
| ^
kangaroo.cpp: In function 'std::istream& operator>>(std::istream&, int&&)':
kangaroo.cpp:6:57: error: there are no arguments to 'begin' that depend on a template parameter, so a declaration of 'begin' must be available [-fpermissive]
6 | istream& operator>>(istream &s, R &&v) { for (auto &x : v) s >> x; return s; }
| ^
kangaroo.cpp:6:57: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
kangaroo.cpp:6:57: error: there are no arguments to 'end' that depend on a template parameter, so a declaration of 'end' must be available [-fpermissive]
kangaroo.cpp: At global scope:
kangaroo.cpp:7:10: error: 'ranges' has not been declared
7 | template<ranges::range R>
| ^~~~~~
kangaroo.cpp:7:24: error: expected '>' before 'R'
7 | template<ranges::range R>
| ^
kangaroo.cpp:8:33: error: 'R' has not been declared
8 | ostream& operator<<(ostream &s, R &&v) { for (auto &x : v) s << x << ' '; return s; }
| ^
kangaroo.cpp: In function 'std::ostream& operator<<(std::ostream&, int&&)':
kangaroo.cpp:8:57: error: there are no arguments to 'begin' that depend on a template parameter, so a declaration of 'begin' must be available [-fpermissive]
8 | ostream& operator<<(ostream &s, R &&v) { for (auto &x : v) s << x << ' '; return s; }
| ^
kangaroo.cpp:8:57: error: there are no arguments to 'end' that depend on a template parameter, so a declaration of 'end' must be available [-fpermissive]