Boost logo

Boost :

From: Pavel Vozenilek (pavel_vozenilek_at_[hidden])
Date: 2003-07-22 05:57:24


Would it be possible to add helper function 'flatten()' into
circular_buffer?

After invocation, user would be sure of:

&buff[0] < &buff[1] < ... < &buff[n]

In other words, user will be able to treat circular_buffer content as
continuous array of values in this moment.

It is not earth shaking feature, it violates 'minimal interface' ideal but
can be handy:
- when legacy C function requires continuous array (like Win32 API)
- when buffer is being saved to file or written to socket
- special purpose adaptor could present result as (nonresizable) vector<>

Alternatives are simple but much more CPU/memory expensive.

/Pavel


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk