forked from boostorg/iterator
Updated shared_container_iterator to use the new iterator adaptors library. Updated the documentation and examples as well to reflect the changes.
[SVN r19535]
This commit is contained in:
committed by
Peter Dimov
parent
d6c6f0ce16
commit
fff85e7db9
@@ -9,8 +9,7 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
typedef boost::shared_container_iterator_generator< std::vector<int> >::type
|
typedef boost::shared_container_iterator< std::vector<int> > iterator;
|
||||||
iterator;
|
|
||||||
|
|
||||||
|
|
||||||
void set_range(iterator& i, iterator& end) {
|
void set_range(iterator& i, iterator& end) {
|
||||||
|
@@ -11,10 +11,9 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
|
||||||
typedef boost::shared_container_iterator_generator< std::vector<int> >::type
|
typedef boost::shared_container_iterator< std::vector<int> > iterator;
|
||||||
function_iterator;
|
|
||||||
|
|
||||||
std::pair<function_iterator,function_iterator>
|
std::pair<iterator,iterator>
|
||||||
return_range() {
|
return_range() {
|
||||||
boost::shared_ptr< std::vector<int> > range(new std::vector<int>());
|
boost::shared_ptr< std::vector<int> > range(new std::vector<int>());
|
||||||
range->push_back(0);
|
range->push_back(0);
|
||||||
@@ -30,7 +29,7 @@ return_range() {
|
|||||||
int main() {
|
int main() {
|
||||||
|
|
||||||
|
|
||||||
function_iterator i,end;
|
iterator i,end;
|
||||||
|
|
||||||
boost::tie(i,end) = return_range();
|
boost::tie(i,end) = return_range();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user