File indexing completed on 2025-01-18 09:47:48
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef BOOST_POLY_COLLECTION_DETAIL_AUTO_ITERATOR_HPP
0010 #define BOOST_POLY_COLLECTION_DETAIL_AUTO_ITERATOR_HPP
0011
0012 #if defined(_MSC_VER)
0013 #pragma once
0014 #endif
0015
0016 #include <boost/iterator/iterator_adaptor.hpp>
0017
0018 namespace boost{
0019
0020 namespace poly_collection{
0021
0022 namespace detail{
0023
0024
0025
0026
0027
0028
0029
0030
0031 template<typename Iterator>
0032 class auto_iterator:
0033 public boost::iterator_adaptor<auto_iterator<Iterator>,Iterator,Iterator>
0034 {
0035 public:
0036 auto_iterator()=default;
0037 auto_iterator(const Iterator& it):auto_iterator::iterator_adaptor_{it}{}
0038 auto_iterator(const auto_iterator&)=default;
0039 auto_iterator& operator=(const auto_iterator&)=default;
0040
0041 private:
0042 friend class boost::iterator_core_access;
0043
0044 Iterator& dereference()const noexcept
0045 {
0046 return const_cast<auto_iterator*>(this)->base_reference();
0047 }
0048 };
0049
0050 }
0051
0052 }
0053
0054 }
0055
0056 #endif