File indexing completed on 2025-01-18 09:51:18
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef BOOST_RANGE_ITERATOR_RANGE_IO_HPP_INCLUDED
0011 #define BOOST_RANGE_ITERATOR_RANGE_IO_HPP_INCLUDED
0012
0013 #include <boost/config.hpp>
0014 #include <boost/detail/workaround.hpp>
0015
0016 #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500))
0017 #pragma warning( push )
0018 #pragma warning( disable : 4996 )
0019 #endif
0020
0021
0022 #ifndef BOOST_OLD_IOSTREAMS
0023 # if defined(__STL_CONFIG_H) && \
0024 !defined (__STL_USE_NEW_IOSTREAMS) && !defined(__crayx1) \
0025
0026 # define BOOST_OLD_IOSTREAMS
0027 # endif
0028 #endif
0029
0030 #ifndef _STLP_NO_IOSTREAMS
0031 # ifndef BOOST_OLD_IOSTREAMS
0032 # include <ostream>
0033 # else
0034 # include <ostream.h>
0035 # endif
0036 #endif
0037
0038 #include <boost/range/iterator_range_core.hpp>
0039 #include <iterator>
0040 #include <algorithm>
0041 #include <cstddef>
0042
0043 namespace boost
0044 {
0045
0046 #ifndef _STLP_NO_IOSTREAMS
0047 # ifndef BOOST_OLD_IOSTREAMS
0048
0049
0050
0051
0052
0053
0054 template< typename IteratorT, typename Elem, typename Traits >
0055 inline std::basic_ostream<Elem,Traits>& operator<<(
0056 std::basic_ostream<Elem, Traits>& Os,
0057 const iterator_range<IteratorT>& r )
0058 {
0059 std::copy( r.begin(), r.end(),
0060 std::ostream_iterator< BOOST_DEDUCED_TYPENAME
0061 iterator_value<IteratorT>::type,
0062 Elem, Traits>(Os) );
0063 return Os;
0064 }
0065
0066 # else
0067
0068
0069
0070
0071
0072
0073 template< typename IteratorT >
0074 inline std::ostream& operator<<(
0075 std::ostream& Os,
0076 const iterator_range<IteratorT>& r )
0077 {
0078 std::copy( r.begin(), r.end(), std::ostream_iterator<char>(Os));
0079 return Os;
0080 }
0081
0082 # endif
0083 #endif
0084
0085 }
0086
0087 #undef BOOST_OLD_IOSTREAMS
0088
0089 #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500))
0090 #pragma warning(pop)
0091 #endif
0092
0093 #endif