Quick Q: What's the right way to use && parameters? -- StackOverflow

From SO:

Correct usage of rvalue references as parameters

Let's take the following method as an example: [...]

void Asset::Load( const std::string& Path )
{
    // complicated method....
}
void Asset::Load( std::string&& Path )
{
     Load(Path); // call the above method
}

Is this a correct approach to writing rvalue versions of methods?

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.