*** empty log message ***

[SVN r27796]
This commit is contained in:
Thorsten Jørgen Ottosen
2005-03-24 11:23:04 +00:00
parent 7d5596abd6
commit 1c8f27535d
7 changed files with 120 additions and 88 deletions

View File

@ -49,25 +49,28 @@ namespace boost
{
typedef BOOST_DEDUCED_TYPENAME boost::range_size<Left>::type sz_type;
sz_type l_size = size( l ),
r_size = size( r );
sz_type l_size = boost::size( l ),
r_size = boost::size( r );
if( l_size != r_size )
return false;
return std::equal( begin(l), end(l),
begin(r) );
return std::equal( boost::begin(l), boost::end(l),
boost::begin(r) );
}
template< class Left, class Right >
inline bool less_than( const Left& l, const Right& r )
{
return std::lexicographical_compare( begin(l),
end(l),
begin(r),
end(r) );
return std::lexicographical_compare( boost::begin(l),
boost::end(l),
boost::begin(r),
boost::end(r) );
}
//
// To be deleted...
//
// The functions adl_begin and adl_end are implemented in a separate
// class for gcc-2.9x
template<typename IteratorT>
@ -162,25 +165,25 @@ namespace boost
//! Constructor from a Range
template< class Range >
iterator_range( const Range& r ) :
m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) ),
m_Begin( boost::begin( r ) ), m_End( boost::end( r ) ),
singular(false) {}
//! Constructor from a Range
template< class Range >
iterator_range( Range& r ) :
m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) ),
m_Begin( boost::begin( r ) ), m_End( boost::end( r ) ),
singular(false) {}
//! Constructor from a Range
template< class Range >
iterator_range( const Range& r, iterator_range_detail::const_range_tag ) :
m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) ),
m_Begin( boost::begin( r ) ), m_End( boost::end( r ) ),
singular(false) {}
//! Constructor from a Range
template< class Range >
iterator_range( Range& r, iterator_range_detail::range_tag ) :
m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) ),
m_Begin( boost::begin( r ) ), m_End( boost::end( r ) ),
singular(false) {}
template< class Iterator >
@ -198,8 +201,8 @@ namespace boost
template< class ForwardRange >
iterator_range& operator=( ForwardRange& r )
{
m_Begin = impl::adl_begin( r );
m_End = impl::adl_end( r );
m_Begin = boost::begin( r );
m_End = boost::end( r );
singular = false;
return *this;
}
@ -207,8 +210,8 @@ namespace boost
template< class ForwardRange >
iterator_range& operator=( const ForwardRange& r )
{
m_Begin = impl::adl_begin( r );
m_End = impl::adl_end( r );
m_Begin = boost::begin( r );
m_End = boost::end( r );
singular = false;
return *this;
}
@ -325,7 +328,7 @@ namespace boost
std::basic_ostream<Elem, Traits>& Os,
const iterator_range<IteratorT>& r )
{
std::copy( begin(r), end(r), std::ostream_iterator<Elem>(Os));
std::copy( boost::begin(r), boost::end(r), std::ostream_iterator<Elem>(Os));
return Os;
}
@ -341,7 +344,7 @@ namespace boost
std::ostream& Os,
const iterator_range<IteratorT>& r )
{
std::copy( begin(r), end(r), std::ostream_iterator<char>(Os));
std::copy( boost::begin(r), boost::end(r), std::ostream_iterator<char>(Os));
return Os;
}
@ -444,7 +447,7 @@ namespace boost
make_iterator_range( Range& r )
{
return iterator_range< BOOST_DEDUCED_TYPENAME range_result_iterator<Range>::type >
( begin( r ), end( r ) );
( boost::begin( r ), boost::end( r ) );
}
#else
@ -483,8 +486,8 @@ namespace boost
return make_iterator_range( r );
BOOST_DEDUCED_TYPENAME range_result_iterator<Range>::type
new_begin = begin( r ),
new_end = end( r );
new_begin = boost::begin( r ),
new_end = boost::end( r );
std::advance( new_begin, advance_begin );
std::advance( new_end, advance_end );
return make_iterator_range( new_begin, new_end );
@ -538,7 +541,7 @@ namespace boost
template< typename SeqT, typename Range >
inline SeqT copy_range( const Range& r )
{
return SeqT( begin( r ), end( r ) );
return SeqT( boost::begin( r ), boost::end( r ) );
}
} // namespace 'boost'