|
Boost : |
From: Jan Gaspar (jga_at_[hidden])
Date: 2003-07-22 12:55:27
Ok, it would be possible.
Jan
Pavel Vozenilek wrote:
> 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
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
-- Jan Gaspar | jga_at_[hidden] Whitestein Technologies | www.whitestein.com Panenska 28 | SK-81103 Bratislava | Slovak Republic Tel +421(2)5930-0735 | Fax +421(2)5443-5512
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk