Boost logo

Boost :

Subject: Re: [boost] Boost.Algorithm design question
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2011-10-07 12:14:22

Den 07-10-2011 18:11, Phil Endecott skrev:

> The need to use a temporary is not inherent in the algorithm; if I'm
> swapping ints my processor might be able to do that with a single
> instruction and no (apparent) temporary. And then there are classic
> nasty tricks like
> a -= b; b += a; a = b-a;

Or the swap-by-XORing trick.


Boost list run by bdawes at, gregod at, cpdaniel at, john at