C++ mutable
时间: 2023-11-14 09:25:18 浏览: 102
在C++中,关键字mutable用于突破const的限制。被mutable修饰的变量将永远处于可变的状态,即使在一个const函数中,也可以修改mutable成员。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [C++ Mutable](https://blog.csdn.net/weixin_39640298/article/details/119391997)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *3* [C++之 mutable](https://blog.csdn.net/yyxyong/article/details/77939866)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文