Mo,
in your compile options use BOOST_UBLAS_MOVE_SEMANTICS.
(i.e. in gcc that would be -DBOOST_UBLAS_MOVE_SEMANTICS)
I would like to make a couple of changes in the bounded types and push the idea to make the move_semantics default, as it seems all compilers support copy elision and even if they don't there is no penalty.
see also:
http://www.boost.org/doc/libs/1_43_0/libs/numeric/ublas/doc/options.htm
There had been some discussion in the past and I see that with the new standard we will be able to go even further in totally eliminating temporaries.
Take a look at this also:
http://cpp-next.com/archive/2009/09/making-your-next-move/
Best
Nasos
> Date: Sat, 22 May 2010 15:39:08 +0800
> From: sth4nth@gmail.com
> To: ublas@lists.boost.org
> Subject: [ublas] rvalue reference and move
>
> Since gcc 4.4 4.5 and VC2010 all support the rvalue reference, I think
> it will be beneficial to utilize this feature to implement the move
> semantic for those containers of uBlas. Is there any plan for this or
> anyone doing this?
>
> Regards,
> Mo
> _______________________________________________
> ublas mailing list
> ublas@lists.boost.org
> http://lists.boost.org/mailman/listinfo.cgi/ublas
> Sent to: nasos_i@hotmail.com
The New Busy is not the old busy. Search, chat and e-mail from your inbox. Get started.