1 // Copyright 2003 The Trustees of Indiana University.
3 // Use, modification and distribution is subject to the Boost Software
4 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
7 #include "boost/shared_container_iterator.hpp"
8 #include "boost/shared_ptr.hpp"
9 #include "boost/tuple/tuple.hpp" // for boost::tie
10 #include <algorithm> // for std::copy
15 typedef boost::shared_container_iterator
< std::vector
<int> > iterator
;
17 std::pair
<iterator
,iterator
>
19 boost::shared_ptr
< std::vector
<int> > range(new std::vector
<int>());
26 return boost::make_shared_container_range(range
);
35 boost::tie(i
,end
) = return_range();
37 std::copy(i
,end
,std::ostream_iterator
<int>(std::cout
,","));