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:
Ronald Garcia
2003-08-11 16:29:47 +00:00
committed by Peter Dimov
parent d6c6f0ce16
commit fff85e7db9
2 changed files with 4 additions and 6 deletions

View File

@@ -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) {

View File

@@ -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();