|
Boost : |
Subject: Re: [boost] Improving the assignment operators of various Boosttypes
From: Peter Dimov (pdimov_at_[hidden])
Date: 2008-09-10 15:59:12
Giovanni Piero Deretta:
> template<class T> T destructive_copy(T& x) {
> using std::swap;
> T result;
> swap(result, x);
> return x;
> }
This is pretty cool. A completely move-library-less implementation of move.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk