|
Boost : |
From: Matthias Troyer (troyer_at_[hidden])
Date: 2002-11-24 14:39:03
On Sunday, November 24, 2002, at 06:40 PM, Robert Ramey wrote:
> 5.5 "Superfast I/O"
>
> There have been requests to add more primitive virtual functions to
> basic_[i|o]archive in order to permit increased efficiency.
> Specifically,
> the idea is to add for each primitive type a virtual function to permit
> override of a C array of that type. So that the native binary
> archive could implement
>
> basic_oarchive & basic_oarchive::operator<<(double & t[]) const
> {
> write_binary(&t[0], sizeof(t));
> }
Robert,
you seem to have misunderstood that:
a function
void basic_oarchive::write_array(double* p, std::size_t n)
will work for ALL contiguous data: C-arrays, std::vector, ublas and MTL
arrays, and so on
Matthias
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk