Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r59033 - sandbox/numeric_bindings/boost/numeric/bindings
From: rutger_at_[hidden]
Date: 2010-01-15 07:39:48


Author: rutger
Date: 2010-01-15 07:39:47 EST (Fri, 15 Jan 2010)
New Revision: 59033
URL: http://svn.boost.org/trac/boost/changeset/59033

Log:
hardened io.hpp against foreign namespaces

Text files modified:
   sandbox/numeric_bindings/boost/numeric/bindings/io.hpp | 9 +++++----
   1 files changed, 5 insertions(+), 4 deletions(-)

Modified: sandbox/numeric_bindings/boost/numeric/bindings/io.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/io.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/io.hpp 2010-01-15 07:39:47 EST (Fri, 15 Jan 2010)
@@ -23,13 +23,14 @@
 
 template< typename Stream, typename T >
 Stream& pretty_print( Stream& os, const T& t ) {
+ namespace bindings = ::boost::numeric::bindings;
     os << "[" << size1(t) << "] ";
- typename result_of::begin< const T >::type i = begin(t);
- if ( i != end(t) ) {
+ typename bindings::result_of::begin< const T >::type i = bindings::begin(t);
+ if ( i != bindings::end(t) ) {
         os << *i;
         ++i;
     }
- for( ; i != end(t); ++i ) {
+ for( ; i != bindings::end(t); ++i ) {
         os << " " << *i;
     }
     return os;
@@ -43,7 +44,7 @@
 
 template< typename T >
 std::ostream& operator<<( std::ostream& os,
- boost::numeric::bindings::detail::adaptable_type<T> const& object ) {
+ const boost::numeric::bindings::detail::adaptable_type<T>& object ) {
     return boost::numeric::bindings::detail::pretty_print( os, object.derived() );
 }
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk