$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Rainer Deyke (rainerd_at_[hidden])
Date: 2003-07-23 07:57:53
Jan Gaspar wrote:
> I think, I changed mind. The flatten() method can be substituted by
> something like this:
>
> void doSomething(const int* pInt, size_t numInts); // C API
> circular_buffer<int> intBuffer(10);
> ...
> // fill the buffer somehow
> vector<int> v(intBuffer.begin(), intBuffer.end()); // copy
> if (!v.empty()) doSomething(&v[0], v.size()); // pass the data
> to the API
Not if 'doSomething' is a mutating operation.
-- Rainer Deyke - rainerd_at_[hidden] - http://eldwood.com