std::bind()Type&&
时间: 2023-10-19 19:26:31 浏览: 91
C++ 11 std::function和std::bind使用详解
std::bind()的参数类型是Type&&。这是因为std::bind()可以接受各种类型的参数,包括函数指针、成员函数指针、函数对象等等。Type&&表示右值引用类型,用于接收右值参数,即临时对象或将要销毁的对象。通过使用std::bind()的Type&&参数,可以将可调用对象与参数进行绑定,并在需要时调用。 <span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [C++编程经验(11):std::function 和 bind绑定器](https://blog.csdn.net/qq_43762191/article/details/119903878)[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_2"}}] [.reference_item style="max-width: 50%"]
- *3* [std::bind 源码分析](https://blog.csdn.net/c553110519/article/details/126472819)[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_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文