diff --git a/example/node_iterator2.hpp b/example/node_iterator2.hpp index 15b40aa..6aa0a4c 100755 --- a/example/node_iterator2.hpp +++ b/example/node_iterator2.hpp @@ -44,9 +44,9 @@ class node_iter # if !BOOST_WORKAROUND(__GNUC__, == 2) - private: // GCC2 can't even grant that friendship to template member functions -# endif + private: // GCC2 can't grant friendship to template member functions friend class boost::iterator_core_access; +# endif template bool equal(node_iter const& other) const @@ -54,14 +54,14 @@ class node_iter return this->m_node == other.m_node; } - private: void increment() { m_node = m_node->next(); } Value& dereference() const { return *m_node; } # ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS public: -# else +# else + private: template friend class node_iter; # endif Value* m_node; diff --git a/example/node_iterator3.hpp b/example/node_iterator3.hpp index 12e7652..85127e1 100755 --- a/example/node_iterator3.hpp +++ b/example/node_iterator3.hpp @@ -47,8 +47,10 @@ class node_iter ) : super_t(other.base()) {} - private: +# if !BOOST_WORKAROUND(__GNUC__, == 2) + private: // GCC2 can't grant friendship to template member functions friend class boost::iterator_core_access; +# endif void increment() { this->base_reference() = this->base()->next(); } }; diff --git a/example/permutation_iterator_example.cpp b/example/permutation_iterator_example.cpp index 195f39d..7e8ec57 100644 --- a/example/permutation_iterator_example.cpp +++ b/example/permutation_iterator_example.cpp @@ -1,6 +1,7 @@ #include #include -#include +#include +#include #include #include @@ -10,7 +11,7 @@ int main() { int i = 0; typedef std::vector< int > element_range_type; - typedef std::list< int > index_type; + typedef std::deque< int > index_type; static const int element_range_size = 10; static const int index_size = 4;