BOOST源码笔记(4) - thread_move_t概念

本文介绍了一个概念movable,即std::auto_ptr的概念,探讨了移动语义和所有权转移的实现方式,强调在遇见thread_move_t时如何手动处理原有move_t内部资源的释放。

这里提到一个movable的概念,即是std::auto_ptr的概念,即可移动了,所有权转移的,一句话,你有我就没有,这样,你需要在看见thread_move_t的时候,毫不犹豫地自己动手的,把原来的move_t内部的东东咔嚓掉。

 

以下是补充完整后的代码,包含 `find_library(Boost_SERIALIZATION_LIBRARY_RELEASE ...)` 之后查找其他 Boost 库以及后续可能的配置操作: ```cmake find_library(Boost_SYSTEM_LIBRARY_RELEASE NAMES boost_system boost_system-mt boost_system-vc90-mt boost_system-vc90-mt-1_69 libboost_system-vc90-mt-1_69 HINTS "${Boost_LIBRARY_DIR_RELEASE}" "${Boost_LIBRARY_DIR_DEBUG}") find_library(Boost_SYSTEM_LIBRARY_DEBUG NAMES boost_system-gd boost_system-mt-gd boost_system-vc90-mt-gd boost_system-vc90-mt-gd-1_69 libboost_system-vc90-mt-gd-1_69 HINTS "${Boost_LIBRARY_DIR_DEBUG}" "${Boost_LIBRARY_DIR_RELEASE}") find_library(Boost_FILESYSTEM_LIBRARY_RELEASE NAMES boost_filesystem boost_filesystem-mt boost_filesystem-vc90-mt boost_filesystem-vc90-mt-1_69 libboost_filesystem-vc90-mt-1_69 HINTS "${Boost_LIBRARY_DIR_RELEASE}" "${Boost_LIBRARY_DIR_DEBUG}") find_library(Boost_FILESYSTEM_LIBRARY_DEBUG NAMES boost_filesystem-gd boost_filesystem-mt-gd boost_filesystem-vc90-mt-gd boost_filesystem-vc90-mt-gd-1_69 libboost_filesystem-vc90-mt-gd-1_69 HINTS "${Boost_LIBRARY_DIR_DEBUG}" "${Boost_LIBRARY_DIR_RELEASE}") find_library(Boost_THREAD_LIBRARY_RELEASE NAMES boost_thread boost_thread-mt boost_thread-vc90-mt boost_thread-vc90-mt-1_69 libboost_thread-vc90-mt-1_69 HINTS "${Boost_LIBRARY_DIR_RELEASE}" "${Boost_LIBRARY_DIR_DEBUG}") find_library(Boost_THREAD_LIBRARY_DEBUG NAMES boost_thread-gd boost_thread-mt-gd boost_thread-vc90-mt-gd boost_thread-vc90-mt-gd-1_69 libboost_thread-vc90-mt-gd-1_69 HINTS "${Boost_LIBRARY_DIR_DEBUG}" "${Boost_LIBRARY_DIR_RELEASE}") find_library(Boost_DATE_TIME_LIBRARY_RELEASE NAMES boost_date_time boost_date_time-mt boost_date_time-vc90-mt boost_date_time-vc90-mt-1_69 libboost_date_time-vc90-mt-1_69 HINTS "${Boost_LIBRARY_DIR_RELEASE}" "${Boost_LIBRARY_DIR_DEBUG}") find_library(Boost_DATE_TIME_LIBRARY_DEBUG NAMES boost_date_time-gd boost_date_time-mt-gd boost_date_time-vc90-mt-gd boost_date_time-vc90-mt-gd-1_69 libboost_date_time-vc90-mt-gd-1_69 HINTS "${Boost_LIBRARY_DIR_DEBUG}" "${Boost_LIBRARY_DIR_RELEASE}") find_library(Boost_IOSTREAMS_LIBRARY_RELEASE NAMES boost_iostreams boost_iostreams-mt boost_iostreams-vc90-mt boost_iostreams-vc90-mt-1_69 libboost_iostreams-vc90-mt-1_69 HINTS "${Boost_LIBRARY_DIR_RELEASE}" "${Boost_LIBRARY_DIR_DEBUG}") find_library(Boost_IOSTREAMS_LIBRARY_DEBUG NAMES boost_iostreams-gd boost_iostreams-mt-gd boost_iostreams-vc90-mt-gd boost_iostreams-vc90-mt-gd-1_69 libboost_iostreams-vc90-mt-gd-1_69 HINTS "${Boost_LIBRARY_DIR_DEBUG}" "${Boost_LIBRARY_DIR_RELEASE}") find_library(Boost_SERIALIZATION_LIBRARY_RELEASE NAMES boost_serialization boost_serialization-mt boost_serialization-vc90-mt boost_serialization-vc90-mt-1_69 libboost_serialization-vc90-mt-1_69 HINTS "${Boost_LIBRARY_DIR_RELEASE}" "${Boost_LIBRARY_DIR_DEBUG}") find_library(Boost_SERIALIZATION_LIBRARY_DEBUG NAMES boost_serialization-gd boost_serialization-mt-gd boost_serialization-vc90-mt-gd boost_serialization-vc90-mt-gd-1_69 libboost_serialization-vc90-mt-gd-1_69 HINTS "${Boost_LIBRARY_DIR_DEBUG}" "${Boost_LIBRARY_DIR_RELEASE}") # 检查是否找到所需的Boost库 if(Boost_SYSTEM_LIBRARY_RELEASE AND Boost_SYSTEM_LIBRARY_DEBUG AND Boost_FILESYSTEM_LIBRARY_RELEASE AND Boost_FILESYSTEM_LIBRARY_DEBUG AND Boost_THREAD_LIBRARY_RELEASE AND Boost_THREAD_LIBRARY_DEBUG AND Boost_DATE_TIME_LIBRARY_RELEASE AND Boost_DATE_TIME_LIBRARY_DEBUG AND Boost_IOSTREAMS_LIBRARY_RELEASE AND Boost_IOSTREAMS_LIBRARY_DEBUG AND Boost_SERIALIZATION_LIBRARY_RELEASE AND Boost_SERIALIZATION_LIBRARY_DEBUG) set(Boost_FOUND TRUE) message(STATUS "Found Boost libraries successfully.") # 设置不同构建类型下的Boost库 set(Boost_LIBRARIES optimized ${Boost_SYSTEM_LIBRARY_RELEASE} debug ${Boost_SYSTEM_LIBRARY_DEBUG} optimized ${Boost_FILESYSTEM_LIBRARY_RELEASE} debug ${Boost_FILESYSTEM_LIBRARY_DEBUG} optimized ${Boost_THREAD_LIBRARY_RELEASE} debug ${Boost_THREAD_LIBRARY_DEBUG} optimized ${Boost_DATE_TIME_LIBRARY_RELEASE} debug ${Boost_DATE_TIME_LIBRARY_DEBUG} optimized ${Boost_IOSTREAMS_LIBRARY_RELEASE} debug ${Boost_IOSTREAMS_LIBRARY_DEBUG} optimized ${Boost_SERIALIZATION_LIBRARY_RELEASE} debug ${Boost_SERIALIZATION_LIBRARY_DEBUG}) include_directories(${Boost_INCLUDE_DIR}) else() set(Boost_FOUND FALSE) message(FATAL_ERROR "Could not find all required Boost libraries. Please check your Boost installation and paths.") endif() ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值