-template <class A>
-struct iterator_pair : public std::pair<A, A> {
- explicit iterator_pair(const A & first, const A & second) : std::pair<A, A>(first, second) {}
-};
-
-template <class A>
-const struct iterator_pair<A> make_iterator_pair(const A & first, const A & second) {
- return iterator_pair<A>(first, second);
-}
-
-template <class A, class B>
-std::ostream & operator<<(std::ostream &o, const std::pair<A,B> &d) {
- o << "<" << d.first << "," << d.second << ">";
- return o;
+namespace std {
+ // Sticking this in std:: makes it possible for ostream_iterator to use it.
+ template <class A, class B>
+ ostream & operator<<(ostream &o, const pair<A,B> &d) {
+ return o << "<" << d.first << "," << d.second << ">";
+ }