[iterator] Why no assignment operator for filter_iterator?

Is there a reason why filter_iterator has no assignment operator? I have a place in my code where I want to perform an assignment of filter_iterators. Can anyone suggest a work-around? Thanks in advance, David Jones

"David M. Jones" <djones@keymark.com> writes:
Is there a reason why filter_iterator has no assignment operator?
There's no reason, because it has an assignment operator.
I have a place in my code where I want to perform an assignment of filter_iterators. Can anyone suggest a work-around?
Just assign it? -- Dave Abrahams Boost Consulting http://www.boost-consulting.com

"David Abrahams" <dave@boost-consulting.com> wrote in message news:umzxiop75.fsf@boost-consulting.com...
"David M. Jones" <djones@keymark.com> writes:
Is there a reason why filter_iterator has no assignment operator?
There's no reason, because it has an assignment operator.
Thanks for your reply. My confusion was due to an extremely unhelpful error message (C2582) from MSVC 7.1. The problem was that the Predicate class I was passing to filter_iterator was not assignable and therefore the compiler could not automatically generate the assignment operator for my class. Because filter_iterator relies on the compiler for the default assignment operator, the error message pointed to that class rather than to the Predicate class that was the real culprit. David
participants (2)
-
David Abrahams
-
David M. Jones