mirror of
https://github.com/CnTransGroup/EffectiveModernCppChinese.git
synced 2025-02-04 16:20:31 +08:00
item28: update item28
fix translate error
This commit is contained in:
parent
1dabbe57e4
commit
5aed21b25d
@ -9,7 +9,7 @@ template<typename T>
|
||||
void func(T&& param);
|
||||
```
|
||||
|
||||
被推导的模板形参`T`将根据被传给`param`的实参被编码为左值或者右值。
|
||||
被推导的模板形参`T`将根据被传给`param`的实参为左值还是右值而被编码.
|
||||
|
||||
编码机制是简单的。当左值实参被传入时,`T`被推导为左值引用。当右值被传入时,`T`被推导为非引用。(请注意不对称性:左值被编码为左值引用,右值被编码为**非引用**。)因此:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user