File indexing completed on 2025-12-16 09:51:44
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #ifndef BOOST_GEOMETRY_VIEWS_IDENTITY_VIEW_HPP
0019 #define BOOST_GEOMETRY_VIEWS_IDENTITY_VIEW_HPP
0020
0021 #include <boost/range/iterator_range.hpp>
0022
0023 #include <boost/range/begin.hpp>
0024 #include <boost/range/end.hpp>
0025
0026
0027 namespace boost { namespace geometry
0028 {
0029
0030
0031 #if defined(_MSC_VER)
0032 #pragma warning(push)
0033 #pragma warning(disable : 4512)
0034 #endif
0035
0036
0037
0038
0039
0040
0041 template <typename Range>
0042 struct identity_view
0043 {
0044 using const_iterator = typename boost::range_iterator<Range const>::type;
0045 using iterator = typename boost::range_iterator<Range>::type;
0046
0047 explicit inline identity_view(Range& r)
0048 : m_begin(boost::begin(r))
0049 , m_end(boost::end(r))
0050 {}
0051
0052 inline const_iterator begin() const { return m_begin; }
0053 inline const_iterator end() const { return m_end; }
0054
0055 inline iterator begin() { return m_begin; }
0056 inline iterator end() { return m_end; }
0057
0058 private:
0059 iterator m_begin;
0060 iterator m_end;
0061 };
0062
0063 #if defined(_MSC_VER)
0064 #pragma warning(pop)
0065 #endif
0066
0067 }}
0068
0069
0070 #endif