mirror of
https://github.com/boostorg/range.git
synced 2025-06-30 06:20:59 +02:00
Compare commits
14 Commits
boost-1.50
...
svn-branch
Author | SHA1 | Date | |
---|---|---|---|
84269aacee | |||
ac5780a6b2 | |||
1cb6a99c80 | |||
c4bd4bf4ce | |||
41b76f8f5c | |||
846f11a96c | |||
8810c4c4aa | |||
91428c2110 | |||
44c26a3356 | |||
b06fca8378 | |||
3b3889b70f | |||
5ed6116490 | |||
df1a3a334f | |||
ad7d7c0c7a |
@ -11,7 +11,7 @@
|
||||
#include <boost/range/algorithm/copy.hpp>
|
||||
#include <boost/assign.hpp>
|
||||
#include <algorithm>
|
||||
#include <functinoal>
|
||||
#include <functional>
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
||||
|
@ -41,5 +41,5 @@ int main(int argc, const char* argv[])
|
||||
display_element_and_index( input | indexed(0) );
|
||||
|
||||
return 0;
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
//
|
||||
#include <boost/range/adaptor/transformed.hpp>
|
||||
#include <boost/range/algorithm/copy.hpp>
|
||||
#include <boost/range/assign.hpp>
|
||||
#include <boost/assign.hpp>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
@ -143,10 +143,6 @@ namespace boost
|
||||
skip_iter(boost::end(r), boost::end(r), p))
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
P m_pred;
|
||||
R* m_range;
|
||||
};
|
||||
|
||||
template< class T >
|
||||
|
0
include/boost/range/adaptor/argument_fwd.hpp
Executable file → Normal file
0
include/boost/range/adaptor/argument_fwd.hpp
Executable file → Normal file
0
include/boost/range/adaptor/copied.hpp
Executable file → Normal file
0
include/boost/range/adaptor/copied.hpp
Executable file → Normal file
@ -44,24 +44,6 @@
|
||||
return range_adaptor <const Range>(rng); \
|
||||
}
|
||||
|
||||
#define BOOST_DEFINE_RANGE_ADAPTOR_1( adaptor_name, range_adaptor, adaptor_class ) \
|
||||
template<typename Range> range_adaptor <Range> \
|
||||
operator|(Range& rng, const adaptor_name & args) \
|
||||
{ \
|
||||
return range_adaptor <Range>(rng, args.arg1); \
|
||||
} \
|
||||
template<typename Range> range_adaptor <const Range> \
|
||||
operator|(const Range& rng, const adaptor_name & args) \
|
||||
{ \
|
||||
return range_adaptor <Range>(rng, args.arg1); \
|
||||
} \
|
||||
template<typename Range, typename Arg1> \
|
||||
range_adaptor<Range> \
|
||||
make_##adaptor_name(Range& rng, Arg1 arg1) \
|
||||
{ \
|
||||
return range_adaptor<Range>(rng, arg1); \
|
||||
}
|
||||
|
||||
#define BOOST_DEFINE_RANGE_ADAPTOR_1( adaptor_name, range_adaptor, arg1_type ) \
|
||||
struct adaptor_name \
|
||||
{ \
|
||||
|
0
include/boost/range/adaptor/filtered.hpp
Executable file → Normal file
0
include/boost/range/adaptor/filtered.hpp
Executable file → Normal file
0
include/boost/range/adaptor/indexed.hpp
Executable file → Normal file
0
include/boost/range/adaptor/indexed.hpp
Executable file → Normal file
0
include/boost/range/adaptor/map.hpp
Executable file → Normal file
0
include/boost/range/adaptor/map.hpp
Executable file → Normal file
0
include/boost/range/adaptor/reversed.hpp
Executable file → Normal file
0
include/boost/range/adaptor/reversed.hpp
Executable file → Normal file
0
include/boost/range/adaptor/sliced.hpp
Executable file → Normal file
0
include/boost/range/adaptor/sliced.hpp
Executable file → Normal file
43
include/boost/range/adaptor/strided.hpp
Executable file → Normal file
43
include/boost/range/adaptor/strided.hpp
Executable file → Normal file
@ -176,6 +176,7 @@ namespace boost
|
||||
strided_iterator()
|
||||
: m_first()
|
||||
, m_last()
|
||||
, m_index(0)
|
||||
, m_stride()
|
||||
{
|
||||
}
|
||||
@ -184,6 +185,7 @@ namespace boost
|
||||
: super_t(it)
|
||||
, m_first(first)
|
||||
, m_last(last)
|
||||
, m_index(stride ? (it - first) / stride : 0)
|
||||
, m_stride(stride)
|
||||
{
|
||||
}
|
||||
@ -194,6 +196,7 @@ namespace boost
|
||||
: super_t(other.base())
|
||||
, m_first(other.base_begin())
|
||||
, m_last(other.base_end())
|
||||
, m_index(other.get_index())
|
||||
, m_stride(other.get_stride())
|
||||
{
|
||||
}
|
||||
@ -201,44 +204,37 @@ namespace boost
|
||||
base_iterator base_begin() const { return m_first; }
|
||||
base_iterator base_end() const { return m_last; }
|
||||
difference_type get_stride() const { return m_stride; }
|
||||
difference_type get_index() const { return m_index; }
|
||||
|
||||
private:
|
||||
void increment()
|
||||
{
|
||||
base_iterator& it = this->base_reference();
|
||||
if ((m_last - it) > m_stride)
|
||||
it += m_stride;
|
||||
m_index += m_stride;
|
||||
if (m_index < (m_last - m_first))
|
||||
this->base_reference() = m_first + m_index;
|
||||
else
|
||||
it = m_last;
|
||||
this->base_reference() = m_last;
|
||||
}
|
||||
|
||||
void decrement()
|
||||
{
|
||||
base_iterator& it = this->base_reference();
|
||||
if ((it - m_first) > m_stride)
|
||||
it -= m_stride;
|
||||
m_index -= m_stride;
|
||||
if (m_index >= 0)
|
||||
this->base_reference() = m_first + m_index;
|
||||
else
|
||||
it = m_first;
|
||||
this->base_reference() = m_first;
|
||||
}
|
||||
|
||||
void advance(difference_type offset)
|
||||
{
|
||||
base_iterator& it = this->base_reference();
|
||||
offset *= m_stride;
|
||||
if (offset >= 0)
|
||||
{
|
||||
if ((m_last - it) > offset)
|
||||
it += offset;
|
||||
else
|
||||
it = m_last;
|
||||
}
|
||||
m_index += offset;
|
||||
if (m_index < 0)
|
||||
this->base_reference() = m_first;
|
||||
else if (m_index > (m_last - m_first))
|
||||
this->base_reference() = m_last;
|
||||
else
|
||||
{
|
||||
if ((m_first - it) > offset)
|
||||
it += offset;
|
||||
else
|
||||
it = m_first;
|
||||
}
|
||||
this->base_reference() = m_first + m_index;
|
||||
}
|
||||
|
||||
template<class OtherIterator>
|
||||
@ -252,12 +248,13 @@ namespace boost
|
||||
|
||||
bool equal(const strided_iterator& other) const
|
||||
{
|
||||
return other.base() == this->base();
|
||||
return this->base() == other.base();
|
||||
}
|
||||
|
||||
private:
|
||||
base_iterator m_first;
|
||||
base_iterator m_last;
|
||||
difference_type m_index;
|
||||
difference_type m_stride;
|
||||
};
|
||||
|
||||
|
0
include/boost/range/adaptor/tokenized.hpp
Executable file → Normal file
0
include/boost/range/adaptor/tokenized.hpp
Executable file → Normal file
0
include/boost/range/adaptor/transformed.hpp
Executable file → Normal file
0
include/boost/range/adaptor/transformed.hpp
Executable file → Normal file
0
include/boost/range/adaptor/uniqued.hpp
Executable file → Normal file
0
include/boost/range/adaptor/uniqued.hpp
Executable file → Normal file
0
include/boost/range/adaptors.hpp
Executable file → Normal file
0
include/boost/range/adaptors.hpp
Executable file → Normal file
0
include/boost/range/algorithm.hpp
Executable file → Normal file
0
include/boost/range/algorithm.hpp
Executable file → Normal file
0
include/boost/range/algorithm/adjacent_find.hpp
Executable file → Normal file
0
include/boost/range/algorithm/adjacent_find.hpp
Executable file → Normal file
0
include/boost/range/algorithm/binary_search.hpp
Executable file → Normal file
0
include/boost/range/algorithm/binary_search.hpp
Executable file → Normal file
0
include/boost/range/algorithm/copy_backward.hpp
Executable file → Normal file
0
include/boost/range/algorithm/copy_backward.hpp
Executable file → Normal file
0
include/boost/range/algorithm/count.hpp
Executable file → Normal file
0
include/boost/range/algorithm/count.hpp
Executable file → Normal file
0
include/boost/range/algorithm/count_if.hpp
Executable file → Normal file
0
include/boost/range/algorithm/count_if.hpp
Executable file → Normal file
0
include/boost/range/algorithm/equal.hpp
Executable file → Normal file
0
include/boost/range/algorithm/equal.hpp
Executable file → Normal file
0
include/boost/range/algorithm/equal_range.hpp
Executable file → Normal file
0
include/boost/range/algorithm/equal_range.hpp
Executable file → Normal file
0
include/boost/range/algorithm/fill.hpp
Executable file → Normal file
0
include/boost/range/algorithm/fill.hpp
Executable file → Normal file
0
include/boost/range/algorithm/fill_n.hpp
Executable file → Normal file
0
include/boost/range/algorithm/fill_n.hpp
Executable file → Normal file
0
include/boost/range/algorithm/find.hpp
Executable file → Normal file
0
include/boost/range/algorithm/find.hpp
Executable file → Normal file
0
include/boost/range/algorithm/find_end.hpp
Executable file → Normal file
0
include/boost/range/algorithm/find_end.hpp
Executable file → Normal file
0
include/boost/range/algorithm/find_first_of.hpp
Executable file → Normal file
0
include/boost/range/algorithm/find_first_of.hpp
Executable file → Normal file
0
include/boost/range/algorithm/find_if.hpp
Executable file → Normal file
0
include/boost/range/algorithm/find_if.hpp
Executable file → Normal file
0
include/boost/range/algorithm/for_each.hpp
Executable file → Normal file
0
include/boost/range/algorithm/for_each.hpp
Executable file → Normal file
0
include/boost/range/algorithm/generate.hpp
Executable file → Normal file
0
include/boost/range/algorithm/generate.hpp
Executable file → Normal file
0
include/boost/range/algorithm/heap_algorithm.hpp
Executable file → Normal file
0
include/boost/range/algorithm/heap_algorithm.hpp
Executable file → Normal file
0
include/boost/range/algorithm/inplace_merge.hpp
Executable file → Normal file
0
include/boost/range/algorithm/inplace_merge.hpp
Executable file → Normal file
0
include/boost/range/algorithm/lexicographical_compare.hpp
Executable file → Normal file
0
include/boost/range/algorithm/lexicographical_compare.hpp
Executable file → Normal file
0
include/boost/range/algorithm/lower_bound.hpp
Executable file → Normal file
0
include/boost/range/algorithm/lower_bound.hpp
Executable file → Normal file
0
include/boost/range/algorithm/max_element.hpp
Executable file → Normal file
0
include/boost/range/algorithm/max_element.hpp
Executable file → Normal file
0
include/boost/range/algorithm/merge.hpp
Executable file → Normal file
0
include/boost/range/algorithm/merge.hpp
Executable file → Normal file
0
include/boost/range/algorithm/min_element.hpp
Executable file → Normal file
0
include/boost/range/algorithm/min_element.hpp
Executable file → Normal file
0
include/boost/range/algorithm/mismatch.hpp
Executable file → Normal file
0
include/boost/range/algorithm/mismatch.hpp
Executable file → Normal file
0
include/boost/range/algorithm/nth_element.hpp
Executable file → Normal file
0
include/boost/range/algorithm/nth_element.hpp
Executable file → Normal file
0
include/boost/range/algorithm/partial_sort.hpp
Executable file → Normal file
0
include/boost/range/algorithm/partial_sort.hpp
Executable file → Normal file
0
include/boost/range/algorithm/partial_sort_copy.hpp
Executable file → Normal file
0
include/boost/range/algorithm/partial_sort_copy.hpp
Executable file → Normal file
0
include/boost/range/algorithm/partition.hpp
Executable file → Normal file
0
include/boost/range/algorithm/partition.hpp
Executable file → Normal file
0
include/boost/range/algorithm/permutation.hpp
Executable file → Normal file
0
include/boost/range/algorithm/permutation.hpp
Executable file → Normal file
0
include/boost/range/algorithm/random_shuffle.hpp
Executable file → Normal file
0
include/boost/range/algorithm/random_shuffle.hpp
Executable file → Normal file
0
include/boost/range/algorithm/remove.hpp
Executable file → Normal file
0
include/boost/range/algorithm/remove.hpp
Executable file → Normal file
0
include/boost/range/algorithm/remove_copy.hpp
Executable file → Normal file
0
include/boost/range/algorithm/remove_copy.hpp
Executable file → Normal file
0
include/boost/range/algorithm/remove_copy_if.hpp
Executable file → Normal file
0
include/boost/range/algorithm/remove_copy_if.hpp
Executable file → Normal file
0
include/boost/range/algorithm/remove_if.hpp
Executable file → Normal file
0
include/boost/range/algorithm/remove_if.hpp
Executable file → Normal file
0
include/boost/range/algorithm/replace.hpp
Executable file → Normal file
0
include/boost/range/algorithm/replace.hpp
Executable file → Normal file
0
include/boost/range/algorithm/replace_copy.hpp
Executable file → Normal file
0
include/boost/range/algorithm/replace_copy.hpp
Executable file → Normal file
0
include/boost/range/algorithm/replace_copy_if.hpp
Executable file → Normal file
0
include/boost/range/algorithm/replace_copy_if.hpp
Executable file → Normal file
0
include/boost/range/algorithm/replace_if.hpp
Executable file → Normal file
0
include/boost/range/algorithm/replace_if.hpp
Executable file → Normal file
0
include/boost/range/algorithm/reverse.hpp
Executable file → Normal file
0
include/boost/range/algorithm/reverse.hpp
Executable file → Normal file
0
include/boost/range/algorithm/reverse_copy.hpp
Executable file → Normal file
0
include/boost/range/algorithm/reverse_copy.hpp
Executable file → Normal file
0
include/boost/range/algorithm/rotate.hpp
Executable file → Normal file
0
include/boost/range/algorithm/rotate.hpp
Executable file → Normal file
0
include/boost/range/algorithm/rotate_copy.hpp
Executable file → Normal file
0
include/boost/range/algorithm/rotate_copy.hpp
Executable file → Normal file
0
include/boost/range/algorithm/search.hpp
Executable file → Normal file
0
include/boost/range/algorithm/search.hpp
Executable file → Normal file
0
include/boost/range/algorithm/search_n.hpp
Executable file → Normal file
0
include/boost/range/algorithm/search_n.hpp
Executable file → Normal file
0
include/boost/range/algorithm/set_algorithm.hpp
Executable file → Normal file
0
include/boost/range/algorithm/set_algorithm.hpp
Executable file → Normal file
0
include/boost/range/algorithm/sort.hpp
Executable file → Normal file
0
include/boost/range/algorithm/sort.hpp
Executable file → Normal file
0
include/boost/range/algorithm/stable_partition.hpp
Executable file → Normal file
0
include/boost/range/algorithm/stable_partition.hpp
Executable file → Normal file
0
include/boost/range/algorithm/stable_sort.hpp
Executable file → Normal file
0
include/boost/range/algorithm/stable_sort.hpp
Executable file → Normal file
0
include/boost/range/algorithm/swap_ranges.hpp
Executable file → Normal file
0
include/boost/range/algorithm/swap_ranges.hpp
Executable file → Normal file
0
include/boost/range/algorithm/transform.hpp
Executable file → Normal file
0
include/boost/range/algorithm/transform.hpp
Executable file → Normal file
0
include/boost/range/algorithm/unique.hpp
Executable file → Normal file
0
include/boost/range/algorithm/unique.hpp
Executable file → Normal file
0
include/boost/range/algorithm/unique_copy.hpp
Executable file → Normal file
0
include/boost/range/algorithm/unique_copy.hpp
Executable file → Normal file
0
include/boost/range/algorithm/upper_bound.hpp
Executable file → Normal file
0
include/boost/range/algorithm/upper_bound.hpp
Executable file → Normal file
0
include/boost/range/algorithm_ext.hpp
Executable file → Normal file
0
include/boost/range/algorithm_ext.hpp
Executable file → Normal file
0
include/boost/range/algorithm_ext/copy_n.hpp
Executable file → Normal file
0
include/boost/range/algorithm_ext/copy_n.hpp
Executable file → Normal file
0
include/boost/range/algorithm_ext/erase.hpp
Executable file → Normal file
0
include/boost/range/algorithm_ext/erase.hpp
Executable file → Normal file
0
include/boost/range/algorithm_ext/for_each.hpp
Executable file → Normal file
0
include/boost/range/algorithm_ext/for_each.hpp
Executable file → Normal file
0
include/boost/range/algorithm_ext/insert.hpp
Executable file → Normal file
0
include/boost/range/algorithm_ext/insert.hpp
Executable file → Normal file
0
include/boost/range/algorithm_ext/is_sorted.hpp
Executable file → Normal file
0
include/boost/range/algorithm_ext/is_sorted.hpp
Executable file → Normal file
0
include/boost/range/algorithm_ext/overwrite.hpp
Executable file → Normal file
0
include/boost/range/algorithm_ext/overwrite.hpp
Executable file → Normal file
0
include/boost/range/algorithm_ext/push_back.hpp
Executable file → Normal file
0
include/boost/range/algorithm_ext/push_back.hpp
Executable file → Normal file
0
include/boost/range/algorithm_ext/push_front.hpp
Executable file → Normal file
0
include/boost/range/algorithm_ext/push_front.hpp
Executable file → Normal file
0
include/boost/range/as_array.hpp
Executable file → Normal file
0
include/boost/range/as_array.hpp
Executable file → Normal file
0
include/boost/range/category.hpp
Executable file → Normal file
0
include/boost/range/category.hpp
Executable file → Normal file
0
include/boost/range/combine.hpp
Executable file → Normal file
0
include/boost/range/combine.hpp
Executable file → Normal file
0
include/boost/range/config.hpp
Executable file → Normal file
0
include/boost/range/config.hpp
Executable file → Normal file
0
include/boost/range/const_reverse_iterator.hpp
Executable file → Normal file
0
include/boost/range/const_reverse_iterator.hpp
Executable file → Normal file
0
include/boost/range/counting_range.hpp
Executable file → Normal file
0
include/boost/range/counting_range.hpp
Executable file → Normal file
0
include/boost/range/detail/collection_traits.hpp
Executable file → Normal file
0
include/boost/range/detail/collection_traits.hpp
Executable file → Normal file
0
include/boost/range/detail/collection_traits_detail.hpp
Executable file → Normal file
0
include/boost/range/detail/collection_traits_detail.hpp
Executable file → Normal file
0
include/boost/range/detail/common.hpp
Executable file → Normal file
0
include/boost/range/detail/common.hpp
Executable file → Normal file
0
include/boost/range/detail/const_iterator.hpp
Executable file → Normal file
0
include/boost/range/detail/const_iterator.hpp
Executable file → Normal file
0
include/boost/range/detail/demote_iterator_traversal_tag.hpp
Executable file → Normal file
0
include/boost/range/detail/demote_iterator_traversal_tag.hpp
Executable file → Normal file
0
include/boost/range/detail/difference_type.hpp
Executable file → Normal file
0
include/boost/range/detail/difference_type.hpp
Executable file → Normal file
0
include/boost/range/detail/empty.hpp
Executable file → Normal file
0
include/boost/range/detail/empty.hpp
Executable file → Normal file
0
include/boost/range/detail/extract_optional_type.hpp
Executable file → Normal file
0
include/boost/range/detail/extract_optional_type.hpp
Executable file → Normal file
0
include/boost/range/detail/implementation_help.hpp
Executable file → Normal file
0
include/boost/range/detail/implementation_help.hpp
Executable file → Normal file
0
include/boost/range/detail/iterator.hpp
Executable file → Normal file
0
include/boost/range/detail/iterator.hpp
Executable file → Normal file
0
include/boost/range/detail/misc_concept.hpp
Executable file → Normal file
0
include/boost/range/detail/misc_concept.hpp
Executable file → Normal file
0
include/boost/range/detail/range_return.hpp
Executable file → Normal file
0
include/boost/range/detail/range_return.hpp
Executable file → Normal file
0
include/boost/range/detail/remove_extent.hpp
Executable file → Normal file
0
include/boost/range/detail/remove_extent.hpp
Executable file → Normal file
0
include/boost/range/detail/sfinae.hpp
Executable file → Normal file
0
include/boost/range/detail/sfinae.hpp
Executable file → Normal file
0
include/boost/range/detail/size.hpp
Executable file → Normal file
0
include/boost/range/detail/size.hpp
Executable file → Normal file
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user