C++ moving semantics
I am new to C++ coming from C
I have seen this code and it doesn't mame sense to me how an object is returned ?
like is it a pointer or what exactly.
I have limited knowledge on value types
`std::string take(std::string&& s) {
std::string x = std::move(s);
return x;
}
int main (){
const char* b {"hello, world"};
string a = take(b);}`
https://redd.it/1pukem3
@r_cpp
Post #24560
18