*** empty log message ***

[SVN r24430]
This commit is contained in:
Thorsten Jørgen Ottosen
2004-08-12 10:58:13 +00:00
parent 7d81f9a845
commit 8378643b44
13 changed files with 507 additions and 351 deletions

View File

@ -51,8 +51,6 @@ namespace boost {
template<typename IteratorT>
class iterator_range
{
iterator_range(); // not implemented
public:
//! this type
typedef iterator_range<IteratorT> type;
@ -185,9 +183,9 @@ namespace boost {
/*!
Compare operands for equality
*/
template< class IteratorT >
template< class IteratorT, class IteratorT2 >
inline bool operator==( const iterator_range<IteratorT>& l,
const iterator_range<IteratorT>& r )
const iterator_range<IteratorT2>& r )
{
return ! (l != r);
}
@ -196,9 +194,9 @@ namespace boost {
/*!
Compare operands for non-equality
*/
template< class IteratorT >
template< class IteratorT, class IteratorT2 >
inline bool operator!=( const iterator_range<IteratorT>& l,
const iterator_range<IteratorT>& r )
const iterator_range<IteratorT2>& r )
{
return l.begin() != r.begin() || l.end() != r.end();
}

View File

@ -23,17 +23,15 @@ namespace boost
template< class ForwardRange >
class sub_range : public iterator_range< BOOST_DEDUCED_TYPENAME result_iterator_of<ForwardRange>::type >
{
sub_range(); // not implemented
typedef BOOST_DEDUCED_TYPENAME result_iterator_of<ForwardRange>::type iterator_t;
typedef iterator_range< iterator_t > base;
public:
using base::iterator;
using base::const_iterator;
using base::value_type;
typedef BOOST_DEDUCED_TYPENAME difference_type_of<ForwardRange>::type difference_type;
typedef BOOST_DEDUCED_TYPENAME size_type_of<ForwardRange>::type size_type;
using BOOST_DEDUCED_TYPENAME base::value_type;
using BOOST_DEDUCED_TYPENAME base::iterator;
typedef BOOST_DEDUCED_TYPENAME const_iterator_of<ForwardRange>::type const_iterator;
typedef BOOST_DEDUCED_TYPENAME difference_type_of<ForwardRange>::type difference_type;
typedef BOOST_DEDUCED_TYPENAME size_type_of<ForwardRange>::type size_type;
public:
template< class ForwardRange2 >
@ -63,10 +61,13 @@ namespace boost
return *this;
}
size_type size() const
{
return base::size();
}
public:
iterator begin() { return base::begin(); }
const_iterator begin() const { return base::begin(); }
iterator end() { return base::end(); }
const_iterator end() const { return base::end(); }
size_type size() const { return std::distance( begin(), end() ); }
};

View File

@ -1,28 +0,0 @@
// Boost.Range library
//
// Copyright Thorsten Ottosen 2003-2004. 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 BOOST_RANGE_TYPES_HPP
#define BOOST_RANGE_TYPES_HPP
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
# pragma once
#endif
#include <boost/range/iterator.hpp>
#include <boost/range/const_iterator.hpp>
#include <boost/range/value_type.hpp>
#include <boost/range/size_type.hpp>
#include <boost/range/difference_type.hpp>
#include <boost/range/result_iterator.hpp>
#include <boost/range/reverse_iterator.hpp>
#include <boost/range/const_reverse_iterator.hpp>
#include <boost/range/reverse_result_iterator.hpp>
#endif