diff --git a/include/boost/range/detail/join_iterator.hpp b/include/boost/range/detail/join_iterator.hpp index 70ecf65..d025c81 100644 --- a/include/boost/range/detail/join_iterator.hpp +++ b/include/boost/range/detail/join_iterator.hpp @@ -23,6 +23,10 @@ #include #include #include +#include +#include +#include +#include #include namespace boost @@ -71,7 +75,9 @@ public: Reference dereference(unsigned int selected) const { - return selected ? *m_it2 : *m_it1; + if (selected) + return *m_it2; + return *m_it1; } bool equal(const join_iterator_union& other, unsigned int selected) const @@ -143,12 +149,8 @@ template::type >::type >::value, - typename add_reference< - typename add_const< - typename remove_reference< - typename iterator_reference::type - >::type - >::type + typename add_const< + typename iterator_reference::type >::type, typename iterator_reference::type >::type