Boost logo

Boost :

Subject: Re: [boost] [endian] swap_in_place use case
From: Dave Handley (Dave.Handley_at_[hidden])
Date: 2010-06-04 09:58:00


Vicente Botet wrote:

> I'm looking for a use case where the use of swap_in_place

> (or whatever is renamed) is not followed/preceded by a copy.

I'm not sure you got an answer to this question. Here is a simple use case.

Memory map a network endian file. Swap_in_place. Use.

You definitely don't want a copy in this case since your file could easily be very big. Think of the case where your file is huge (say 10Gb), you really don't want to perform a copy and swap since that puts your memory need at 20Gb instead of 10Gb.

Dave Handley


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