Vladimir Prus wrote: > after having to output std::vector to stream again and again using > custom > solution, I started to wonder why we don't have a solution in boost. > Does it makes sense to include operators<< for vectors, sets, etc? ... > std::cout << "new path is " << v << "\n";
The philosophy behind the STL would suggest accessing containers through their iterators. Something like std::cout << "new path is " << Foo(v.begin(), v.end()) << "\n"; would not be too bad (and it would be even better if it were called something besides "Foo"). This would be very general, while remaining quite readble, I think. Delimiters could be set using optional parameters, among other methods. std::cout << "new path is " << Foo(v.begin(), v.end(), "[", ",", "]") << "\n"; ===== Glenn G. Chappell <>< [EMAIL PROTECTED] Dept. of Mathematical Sciences * Ofc: (907) 474-5736 University of Alaska Fairbanks * Fax: (907) 474-5394 __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost