
Alberto Barbati <abarbati@iaanus.com> writes:
[snip]
BTW, this discussion triggers some other ideas. Have you considered adding to the circular_buffer the capability to optionally notify the user about an impeding overwrite? I have at least one use case where it might be useful. It might be as easy as invoking a boost::function0 callback, at the cost of few bytes in footprint and an extra test before any overwrite. Alternatively, we could put hooks (in form of a template policy, for example) in the main container that are then implemented by a container adaptor, so the user won't pay if it doesn't want such a feature.
I would think that sort of feature would be better implemented as a wrapper around the circular_buffer container. -- Jeremy Maitin-Shepard