// Boost.Range library // // Copyright Neil Groves 2009. // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // For more information, see http://www.boost.org/libs/range/ // #ifndef ACTIV_BOOST_RANGE_ITERATOR_RANGE_IO_HPP_INCLUDED #define ACTIV_BOOST_RANGE_ITERATOR_RANGE_IO_HPP_INCLUDED #include #include #if ACTIV_BOOST_WORKAROUND(ACTIV_BOOST_MSVC, ACTIV_BOOST_TESTED_AT(1500)) #pragma warning( push ) #pragma warning( disable : 4996 ) #endif // From ActivBoost/dynamic_bitset.hpp; thanks to Matthias Troyer for Cray X1 patch. #ifndef ACTIV_BOOST_OLD_IOSTREAMS # if defined(__STL_CONFIG_H) && \ !defined (__STL_USE_NEW_IOSTREAMS) && !defined(__crayx1) \ /**/ # define ACTIV_BOOST_OLD_IOSTREAMS # endif #endif // #ifndef ACTIV_BOOST_OLD_IOSTREAMS #ifndef _STLP_NO_IOSTREAMS # ifndef ACTIV_BOOST_OLD_IOSTREAMS # include # else # include # endif #endif // _STLP_NO_IOSTREAMS #include #include #include #include namespace Boost { #ifndef _STLP_NO_IOSTREAMS # ifndef ACTIV_BOOST_OLD_IOSTREAMS //! iterator_range output operator /*! Output the range to an ostream. Elements are outputted in a sequence without separators. */ template< typename IteratorT, typename Elem, typename Traits > inline std::basic_ostream& operator<<( std::basic_ostream& Os, const iterator_range& r ) { std::copy( r.begin(), r.end(), std::ostream_iterator< ACTIV_BOOST_DEDUCED_TYPENAME iterator_value::type, Elem, Traits>(Os) ); return Os; } # else //! iterator_range output operator /*! Output the range to an ostream. Elements are outputted in a sequence without separators. */ template< typename IteratorT > inline std::ostream& operator<<( std::ostream& Os, const iterator_range& r ) { std::copy( r.begin(), r.end(), std::ostream_iterator(Os)); return Os; } # endif #endif // _STLP_NO_IOSTREAMS } // namespace Boost #undef ACTIV_BOOST_OLD_IOSTREAMS #if ACTIV_BOOST_WORKAROUND(ACTIV_BOOST_MSVC, ACTIV_BOOST_TESTED_AT(1500)) #pragma warning(pop) #endif #endif // include guard