views:

152

answers:

1

Yep -- the title pretty much sums it up. I've got quite a few types that implement iterator concepts, and I'm wondering if it's worthwhile to pull in this boost header instead of implementing things manually.

So far:

Advantages

  • Well specified
  • Less likely to have bugs
+2  A: 

If maintaining your own iterator types becomes a burden then switch to boost. They are well specified and tested and less likely to have bugs.

Eddy Pronk
Okay.. +1 ... but how? The facade is just a frontend that defines the required operators for you on the iterator.
Billy ONeal
Can you post one of your iterators with the question how do I do this with boost?
Eddy Pronk
@epronk: Sure, there's an example using `iterator_facade` in my other question: http://stackoverflow.com/questions/2590310/can-i-use-boostmake-shared-with-a-private-constructor
Billy ONeal
So, what is remaining of the 'how' part of your question?
Eddy Pronk
@epronk: I was asking how `iterator_facade` would reduce the incidence of bugs. At this point I don't think it matters all that much. Here, have +15 rep :)
Billy ONeal