
Hi!
It shouldn't. Implicit conversions are generally dangerous; there's no good reason to allow one here.
Well, that might be in general the case. But at least in my case I think it does make sense: random_set_iterator is basically a std::vector<>::iterator with the noteable difference that the next-operation ++ is replaced by a function which moves the iterator to a random element in within the vector. And as I do want to delete elements from the vector which I find by the random-iterator, I need the conversion.
I'm sure, it should not hard to implement somthing like this, but how?
You can easily add an
operator base_iterator_type() const
to random_set_iterator, but we (the authors of iterator_adaptor) don't recommend it.
Thanks, that did it. Greetings, Sebastian Weber