Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/changkun/modern-cpp-tutorial
/ reference
Function
reference
code/3/3.3.cpp:13–15 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
11
#include <string>
12
13
void reference(std::string& str) {
14
std::cout <<
"左值"
<< std::endl;
15
}
16
void reference(std::string&& str) {
17
std::cout <<
"右值"
<< std::endl;
18
}
Callers
1
main
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected