[cfe-dev] clang++ c++0x and std::move

Marc Glisse marc.glisse at inria.fr
Sat Mar 19 04:21:30 PDT 2011


On Fri, 18 Mar 2011, mercurio7891 wrote:

> I am using clang with xcode 4 along with the -std=c++0x option.
>
> The clang compiler seems to generate an error and say that no matching
> parameters can be found for the following move function. However the code
> compiles perfectly find on MSVC2010.
>
> e.g
> int a =10;
> void rvalueFunc(std::move(a)); // clang produces an error at this line.

Er, what's that code supposed to mean?
With a svn snapshot of clang here, move seems to work:

#include <utility>
void rvalueFunc(int&&);
void f(){
   int a =10;
   rvalueFunc(std::move(a));
}


-- 
Marc Glisse



More information about the cfe-dev mailing list