boost::circular_buffer<T>::front() gives a link to an element to "front", and boost::circular_buffer<T>::pop_front() removes this element.
boost::circular_buffer<T>::back() gives a link to the element at the back, and boost::circular_buffer<T>::pop_back() removes this element.
It looks like your syntax error comes from the most unpleasant parsing. Try instead:
boost::circular_buffer<int> cb; cb.set_capacity(10);
Or more succinctly:
boost::circular_buffer<int> cb((10));
source share