Chris@16: // Boost.Geometry (aka GGL, Generic Geometry Library) Chris@16: Chris@16: // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. Chris@16: // Copyright (c) 2008-2012 Bruno Lalande, Paris, France. Chris@16: // Copyright (c) 2009-2012 Mateusz Loskot, London, UK. Chris@16: Chris@16: // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library Chris@16: // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands. Chris@16: Chris@16: // Use, modification and distribution is subject to the Boost Software License, Chris@16: // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at Chris@16: // http://www.boost.org/LICENSE_1_0.txt) Chris@16: Chris@16: #ifndef BOOST_GEOMETRY_ITERATORS_BASE_HPP Chris@16: #define BOOST_GEOMETRY_ITERATORS_BASE_HPP Chris@16: Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: Chris@16: #ifndef DOXYGEN_NO_DETAIL Chris@16: namespace boost { namespace geometry { namespace detail { namespace iterators Chris@16: { Chris@16: Chris@16: template Chris@16: < Chris@16: typename DerivedClass, Chris@16: typename Iterator, Chris@16: typename TraversalFlag = boost::bidirectional_traversal_tag Chris@16: > Chris@16: struct iterator_base Chris@16: : public boost::iterator_adaptor Chris@16: < Chris@16: DerivedClass, Chris@16: Iterator, Chris@16: boost::use_default, Chris@16: typename boost::mpl::if_ Chris@16: < Chris@16: boost::is_convertible Chris@16: < Chris@16: typename boost::iterator_traversal::type, Chris@16: boost::random_access_traversal_tag Chris@16: >, Chris@16: TraversalFlag, Chris@16: boost::use_default Chris@16: >::type Chris@16: > Chris@16: { Chris@16: // Define operator cast to Iterator to be able to write things like Iterator it = myit++ Chris@16: inline operator Iterator() const Chris@16: { Chris@16: return this->base(); Chris@16: } Chris@16: Chris@16: /*inline bool operator==(Iterator const& other) const Chris@16: { Chris@16: return this->base() == other; Chris@16: } Chris@16: inline bool operator!=(Iterator const& other) const Chris@16: { Chris@16: return ! operator==(other); Chris@16: }*/ Chris@16: }; Chris@16: Chris@16: }}}} // namespace boost::geometry::detail::iterators Chris@16: #endif Chris@16: Chris@16: Chris@16: #endif // BOOST_GEOMETRY_ITERATORS_BASE_HPP