c++ - 有没有const右值引用?
PHP中文网
PHP中文网 2017-04-17 13:13:24
0
2
974

我只见过这种形式:

int&&a=3;

那么有没有const int&&a=3这种形式呢?为什么

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(2)
巴扎黑

There is this type of left and right value references for the completeness of semantics, but rvalues ​​are used to match the movement semantics. Think about the literal values ​​or checkpoint values ​​included in rvalues, constant rvalue references are of no use. Refer to the in-depth understanding of C++11 3.3.3

PHPzhong

Where does the move semantics of constant rvalue appear? Find out this usage scenario

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template