I have no idea what you are trying to do, and since I have no information on what a watermark or how you implemented you circular buffer, I can't help much either.

I will say this though. boost has a circular_buffer container. Maybe using that could help?

I don't see how a watermark could be part of a circular buffer. Don't mix container and containee details.