Re: [eigen] Very interesting read which might be important for us |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
On Wed, 19 May 2010 09:38:34 -0400, Benoit Jacob
<jacob.benoit.1@xxxxxxxxx>
wrote:
> Yes, good read! A2 has been very annoying for us, namely, that binding
> a reference-to-non-const to a temporary object is forbidden. In Eigen
> and other xpr-templates libraries allowing xprs to be lvalues, this
> forces one to use reference-to-const and then const_cast: very
> annoying.
>
> Benoit
>
> 2010/5/19 Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>:
>> Well, at least from a programmers point of view.
>>
>>
http://herbsutter.com/2008/01/01/gotw-88-a-candidate-for-the-most-important-const/
>>
>> - Hauke
>>
>>
>>
I haven't had time to look at Eigen code yet :( so forgive me if I'm out
of touch, but
I though the following might be of interest :
http://lists.boost.org/boost-announce/2010/05/0260.php
"Greetings Boost Developers and Users,
It's my pleasure to announce that the review of Ion Gaztañagas' Move
library starts today, May 10th and lasts until May 24th, 2010, unless
an extension occurs.
What is it?
===========
The Boost.Move library would supply an emulated C++1x Move semantics
interface, aka RValue References, allowing for a wide variety of easy
to use and easy to add in optimization abilities.
The most used function it would add would be:
val_b = boost::move( val_a );
Which would move val_a to val_b; val_a should not be used after this
line. This semantic allows for a vast amount of optimizations,
especially in regards to temporaries, see the documentation for
further examples and use. boost:move would be used in place of
std:move in all areas.
Other patterns emulated are && rvalue references for functions/members
and constructors. There are also a number of STL containers in the
sandbox that support move semantics using this library for higher
efficiency.
[...]
"