## Smart_ptr總結
本章介紹了Boost的智能指針,它們是對C++社區的貢獻,無論怎樣評價都不過份。對于一個成功的 智能指針庫,它必須考慮到并正確地處理大量的細節因素。我可以肯定你曾經見過很多種智能指針,你也可能曾經參與過編寫它們,因此你應該知道做好這件事所要 花費的努力。沒有其它的智能指針可以和它們一樣智能,因此Boost.Smart_ptr庫具有很高的價值。
作為軟件工程中的重要組成部分,Boost的智能指針明顯受到了廣泛的關注和徹底的審查。因此很難列出所有的貢獻者。很多人給出了有價值的意見和對當前的智能指針庫進行了修正。這里列出一些突出的人員及其貢獻:
* Greg Colvin, `auto_ptr`之父, 還提出了`counted_ptr`, 最后成為現在的`shared_ptr`.
* Beman Dawes 重新激活了對智能指針的討論,并提議了Greg Colvin原先建議的語義。
* Peter Dimov 重新設計了智能指針類,增加線程安全,`intrusive_ptr`, 以及 `weak_ptr`.
如此著名的概念不斷地在發展,這是很吸引人的。毫無疑問,智能指針或者說智能資源的領域還會有更進一步的發展,但就今天而言,重要的是智能指針的質量。適 者生存,這就是為什么人們在使用Smart_ptr的原因。Boost 智能指針是一塊精美的、精心挑選的、美味的軟件巧克力,我經常吃它們(你也應該這樣)。我們很快就會看到它們中的某些將成為C++標準庫的一部分,因為它 們已經被收入Library Technical Report。
- 序
- 前言
- Acknowledgments
- 關于作者
- 本書的組織結構
- Boost的介紹
- 字符串及文本處理
- 數 據結構, 容器, 迭代器, 和算法
- 函數對象及高級編程
- 泛 型編程與模板元編程
- 數學及數字處理
- 輸入/輸出
- 雜項
- Part I: 通用庫
- Library 1. Smart_ptr
- Smart_ptr庫如何改進你的程序?
- 何時我們需要智能指針?
- Smart_ptr如何適應標準庫?
- scoped_ptr
- scoped_array
- shared_ptr
- shared_array
- intrusive_ptr
- weak_ptr
- Smart_ptr總結
- Library 2. Conversion
- Conversion 庫如何改進你的程序?
- polymorphic_cast
- polymorphic_downcast
- numeric_cast
- lexical_cast
- Conversion 總結
- Library 3. Utility
- Utility 庫如何改進你的程序?
- BOOST_STATIC_ASSERT
- checked_delete
- noncopyable
- addressof
- enable_if
- Utility 總結
- Library 4. Operators
- Operators庫如何改進你的程序?
- Operators
- 用法
- Operators 總結
- Library 5. Regex
- Regex庫如何改進你的程序?
- Regex 如何適用于標準庫?
- Regex
- 用法
- Regex 總結
- Part II: 容器及數據結構
- Library 6. Any
- Any 庫如何改進你的程序?
- Any 如何適用于標準庫?
- Any
- 用法
- Any 總結
- Library 7. Variant
- Variant 庫如何改進你的程序?
- Variant 如何適用于標準庫?
- Variant
- 用法
- Variant 總結
- Library 8. Tuple
- Tuple 庫如何改進你的程序?
- Tuple 庫如何適用于標準庫?
- Tuple
- 用法
- Tuple 總結
- Part III: 函數對象與高級編程
- Library 9. Bind
- Bind 庫如何改進你的程序?
- Bind 如何適用于標準庫?
- Bind
- 用法
- Bind 總結
- Library 10. Lambda
- Lambda 庫如何改進你的程序?
- Lambda 如何適用于標準庫?
- Lambda
- 用法
- Lambda 總結
- Library 11. Function
- Function 庫如何改進你的程序?
- Function 如何適用于標準庫?
- Function
- 用 法
- Function 總結
- Library 12. Signals
- Signals 庫如何改進你的程序?
- Signals 如何適用于標準庫?
- Signals
- 用法
- Signals 總結