I suggest

T * circular_buffer<T>::data();

Poses the question of how a const circular_buffer could be accessed as a const array:

const T * const circular_buffer<T>::data()
{
        ??
}

BTW - As question for the boost gurus, is there
some way of capturnig a pointer+size for a memory
block (perhaps pointing into a vector or raw
memory) that is encapsulated?  A circular_buffer
can always be accessed as upto two contiguous
memory blocks without the need to reorganise
internally, and without any problem dealing with
a const circular_buffer.

For some reason I've been inclined to do some
pointer style programming lately, but it's
awkward always maintaining ptr and size --
some concept of a block of memory
(fixed size, const and/or non-const) would
be handy.

Nigel


_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to