Re: [eigen] [Eigen] Ref<> does not support std::swap ? |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
Am 16.04.2015 um 15:40 schrieb Gabriel:
But the Ref<> class does not support std::swap correctly
Yes, and we don't intent to support that (the same way you can't swap
plain references).
The reason why supporting this wouldn't be a good idea is that it's not
evident whether the content or the references are swapped.
At the moment, there is no easy work-around for you -- eventually, we
plan to support Eigen::Ptr.
You can try overloading swap(Ref, Ref), implemented using placement-new
-- but you'd sail at your own risk then ...
Christoph
--
----------------------------------------------
Dipl.-Inf., Dipl.-Math. Christoph Hertzberg
Cartesium 0.049
Universität Bremen
Enrique-Schmidt-Straße 5
28359 Bremen
Tel: +49 (421) 218-64252
----------------------------------------------