mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2024-03-22 13:30:58 +08:00
parent
8e327dd4e0
commit
7261f5d2fb
|
@ -14130,12 +14130,12 @@ Defining "small amount" precisely is impossible.
|
||||||
##### Example
|
##### Example
|
||||||
|
|
||||||
string modify1(string);
|
string modify1(string);
|
||||||
void modify2(shared_ptr<string>);
|
void modify2(string&);
|
||||||
|
|
||||||
void fct(string& s)
|
void fct(string& s)
|
||||||
{
|
{
|
||||||
auto res = async(modify1, s);
|
auto res = async(modify1, s);
|
||||||
async(modify2, &s);
|
async(modify2, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
The call of `modify1` involves copying two `string` values; the call of `modify2` does not.
|
The call of `modify1` involves copying two `string` values; the call of `modify2` does not.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user