Martin Magnusson
I have written a custom iterator based on boost::iterator_facade, and I'm trying to use this with the std::partial_sort_copy algorithm.
However, when compiling with g++ I get an error message saying that there is no matching function for a call to counting_iterator(Vertex<3>&). The way I interpret this is that my code is trying to construct a Vertex_Iterator from a Vertex object, but that was not my intenton.
No, it's trying to create a counting_iterator. Why doubt the error message? Where that iterator is coming from, I can't tell you. The problem is that it's a counting_iterator over size_t values, and the code is initializing it with a Vertex<3>&. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com