Boost logo

Boost :

Subject: Re: [boost] [boost::endian] Request for comments/interest
From: Terry Golubiewski (tjgolubi_at_[hidden])
Date: 2010-06-02 00:49:28


I'm sorry. The example copy-in-place example which read...

endian<big, double>* src = reinterpret_cast<endian<big, double>*>(mh +1);
double* dst = reinterpret_cast<double*>(src);
(void) copy(src, src+nElem, dst); // Almost a no-op in the native, endian
case.

... should have read...

endian<big, double>* src = reinterpret_cast<endian<big, double>*>(mh +1);
endian<native, double>* dst = reinterpret_cast<endian<native,
double>*>(src);
(void) copy(src, src+nElem, dst); // Almost a no-op in the native, endian
case.

That is, for the copy() function to work, the destination must be in the
form of an endian<> rather than a raw double pointer.

double* dst ==> endian<native, double>* dst

Sorry for any confusion.
terry


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