diff --git a/include/boost/geometry/iterators/concatenate_iterator.hpp b/include/boost/geometry/iterators/concatenate_iterator.hpp index e97061e1a..20112b4c4 100644 --- a/include/boost/geometry/iterators/concatenate_iterator.hpp +++ b/include/boost/geometry/iterators/concatenate_iterator.hpp @@ -23,13 +23,20 @@ namespace boost { namespace geometry -template +template +< + typename Iterator1, + typename Iterator2, + typename Value, + typename Reference = Value& +> class concatenate_iterator : public boost::iterator_facade < - concatenate_iterator, + concatenate_iterator, Value, - boost::bidirectional_traversal_tag + boost::bidirectional_traversal_tag, + Reference > { private: @@ -54,9 +61,20 @@ public: : m_it1(end1), m_end1(end1), m_begin2(begin2), m_it2(end2) {} - template - concatenate_iterator - (concatenate_iterator const& other) + template + < + typename OtherIt1, + typename OtherIt2, + typename OtherValue, + typename OtherReference + > + concatenate_iterator(concatenate_iterator + < + OtherIt1, + OtherIt2, + OtherValue, + OtherReference + > const& other) : m_it1(other.m_it1) , m_end1(other.m_end1) , m_begin2(other.m_begin2) @@ -71,9 +89,20 @@ public: (types)); } - template - concatenate_iterator - operator=(concatenate_iterator const& other) + template + < + typename OtherIt1, + typename OtherIt2, + typename OtherValue, + typename OtherReference + > + concatenate_iterator operator=(concatenate_iterator + < + OtherIt1, + OtherIt2, + OtherValue, + OtherReference + > const& other) { static const bool are_conv = boost::is_convertible::value @@ -93,10 +122,10 @@ public: private: friend class boost::iterator_core_access; - template + template friend class concatenate_iterator; - inline Value& dereference() const + inline Reference dereference() const { if ( m_it1 == m_end1 ) { @@ -105,12 +134,19 @@ private: return *m_it1; } - template + template + < + typename OtherIt1, + typename OtherIt2, + typename OtherValue, + typename OtherReference + > inline bool equal(concatenate_iterator < OtherIt1, OtherIt2, - OtherValue + OtherValue, + OtherReference > const& other) const { return m_it1 == other.m_it1 && m_it2 == other.m_it2;