Mercurial > hg > vamp-build-and-test
comparison DEPENDENCIES/generic/include/boost/shared_container_iterator.hpp @ 101:c530137014c0
Update Boost headers (1.58.0)
author | Chris Cannam |
---|---|
date | Mon, 07 Sep 2015 11:12:49 +0100 |
parents | 2665513ce2d3 |
children |
comparison
equal
deleted
inserted
replaced
100:793467b5e61c | 101:c530137014c0 |
---|---|
11 #include "boost/iterator_adaptors.hpp" | 11 #include "boost/iterator_adaptors.hpp" |
12 #include "boost/shared_ptr.hpp" | 12 #include "boost/shared_ptr.hpp" |
13 #include <utility> | 13 #include <utility> |
14 | 14 |
15 namespace boost { | 15 namespace boost { |
16 namespace iterators { | |
16 | 17 |
17 template <typename Container> | 18 template <typename Container> |
18 class shared_container_iterator : public iterator_adaptor< | 19 class shared_container_iterator : public iterator_adaptor< |
19 shared_container_iterator<Container>, | 20 shared_container_iterator<Container>, |
20 typename Container::iterator> { | 21 typename Container::iterator> { |
35 | 36 |
36 | 37 |
37 }; | 38 }; |
38 | 39 |
39 template <typename Container> | 40 template <typename Container> |
40 shared_container_iterator<Container> | 41 inline shared_container_iterator<Container> |
41 make_shared_container_iterator(typename Container::iterator iter, | 42 make_shared_container_iterator(typename Container::iterator iter, |
42 boost::shared_ptr<Container> const& container) { | 43 boost::shared_ptr<Container> const& container) { |
43 typedef shared_container_iterator<Container> iterator; | 44 typedef shared_container_iterator<Container> iterator; |
44 return iterator(iter,container); | 45 return iterator(iter,container); |
45 } | 46 } |
46 | 47 |
47 | 48 |
48 | 49 |
49 template <typename Container> | 50 template <typename Container> |
50 std::pair< | 51 inline std::pair< |
51 shared_container_iterator<Container>, | 52 shared_container_iterator<Container>, |
52 shared_container_iterator<Container> > | 53 shared_container_iterator<Container> > |
53 make_shared_container_range(boost::shared_ptr<Container> const& container) { | 54 make_shared_container_range(boost::shared_ptr<Container> const& container) { |
54 return | 55 return |
55 std::make_pair( | 56 std::make_pair( |
56 make_shared_container_iterator(container->begin(),container), | 57 make_shared_container_iterator(container->begin(),container), |
57 make_shared_container_iterator(container->end(),container)); | 58 make_shared_container_iterator(container->end(),container)); |
58 } | 59 } |
59 | 60 |
61 } // namespace iterators | |
62 | |
63 using iterators::shared_container_iterator; | |
64 using iterators::make_shared_container_iterator; | |
65 using iterators::make_shared_container_range; | |
60 | 66 |
61 } // namespace boost | 67 } // namespace boost |
68 | |
62 #endif // SHARED_CONTAINER_ITERATOR_RG08102002_HPP | 69 #endif // SHARED_CONTAINER_ITERATOR_RG08102002_HPP |