« first day (911 days earlier)      last day (1517 days later) » 

10:25 AM
 
1 message moved from PHP
 
 
3 hours later…
1:58 PM
 
1 message moved from PHP
 
 
6 hours later…
8:03 PM
8
Q: Understanding rvalue references

moswaldI think there's something I'm not quite understanding about rvalue references. Why does the following fail to compile (VS2012) with the error 'foo' : cannot convert parameter 1 from 'int' to 'int &&'? void foo(int &&) {} void bar(int &&x) { foo(x); }; I would have assumed that the type int && ...

10
Q: C++0x rvalue references and temporaries

Doug(I asked a variation of this question on comp.std.c++ but didn't get an answer.) Why does the call to f(arg) in this code call the const ref overload of f? void f(const std::string &); //less efficient void f(std::string &&); //more efficient void g(const char * arg) { f(arg); } My intu...

 
2 messages moved from Lounge<Fortran>
 

« first day (911 days earlier)      last day (1517 days later) »