C++风格_Boost库
2017-10-24 19:42
239 查看
只使用 Boost 中被认可的库.
定义:
Boost 库集 是一个广受欢迎, 经过同行鉴定, 免费开源的 C++ 库集.
优点:
Boost代码质量普遍较高, 可移植性好, 填补了 C++ 标准库很多空白, 如型别的特性, 更完善的绑定器, 更好的智能指针。
缺点:
某些 Boost 库提倡的编程实践可读性差, 比如元编程和其他高级模板技术, 以及过度 “函数化” 的编程风格.
结论:
为了向阅读和维护代码的人员提供更好的可读性, 我们只允许使用 Boost 一部分经认可的特性子集. 目前允许使用以下库:
Call Traits : boost/call_traits.hpp
Compressed Pair : boost/compressed_pair.hpp
< The Boost Graph Library (BGL) : boost/graph, except serialization (adj_list_serialize.hpp) and parallel/distributed algorithms and data structures(boost/graph/parallel/* and boost/graph/distributed/*)
Property Map : boost/property_map.hpp
The part of Iterator that deals with defining iterators: boost/iterator/iterator_adaptor.hpp, boost/iterator/iterator_facade.hpp, and boost/function_output_iterator.hpp
The part of Polygon that deals with Voronoi diagram construction and doesn’t depend on the rest of Polygon: boost/polygon/voronoi_builder.hpp, boost/polygon/voronoi_diagram.hpp, and boost/polygon/voronoi_geometry_type.hpp
Bimap : boost/bimap
Statistical Distributions and Functions : boost/math/distributions
Multi-index : boost/multi_index
Heap : boost/heap
The flat containers from Container: boost/container/flat_map, and boost/container/flat_set
我们正在积极考虑增加其它 Boost 特性, 所以列表中的规则将不断变化.
以下库可以用,但由于如今已经被 C++ 11 标准库取代,不再鼓励:
Pointer Container : boost/ptr_container, 改用 std::unique_ptr
Array : boost/array.hpp, 改用 std::array
定义:
Boost 库集 是一个广受欢迎, 经过同行鉴定, 免费开源的 C++ 库集.
优点:
Boost代码质量普遍较高, 可移植性好, 填补了 C++ 标准库很多空白, 如型别的特性, 更完善的绑定器, 更好的智能指针。
缺点:
某些 Boost 库提倡的编程实践可读性差, 比如元编程和其他高级模板技术, 以及过度 “函数化” 的编程风格.
结论:
为了向阅读和维护代码的人员提供更好的可读性, 我们只允许使用 Boost 一部分经认可的特性子集. 目前允许使用以下库:
Call Traits : boost/call_traits.hpp
Compressed Pair : boost/compressed_pair.hpp
< The Boost Graph Library (BGL) : boost/graph, except serialization (adj_list_serialize.hpp) and parallel/distributed algorithms and data structures(boost/graph/parallel/* and boost/graph/distributed/*)
Property Map : boost/property_map.hpp
The part of Iterator that deals with defining iterators: boost/iterator/iterator_adaptor.hpp, boost/iterator/iterator_facade.hpp, and boost/function_output_iterator.hpp
The part of Polygon that deals with Voronoi diagram construction and doesn’t depend on the rest of Polygon: boost/polygon/voronoi_builder.hpp, boost/polygon/voronoi_diagram.hpp, and boost/polygon/voronoi_geometry_type.hpp
Bimap : boost/bimap
Statistical Distributions and Functions : boost/math/distributions
Multi-index : boost/multi_index
Heap : boost/heap
The flat containers from Container: boost/container/flat_map, and boost/container/flat_set
我们正在积极考虑增加其它 Boost 特性, 所以列表中的规则将不断变化.
以下库可以用,但由于如今已经被 C++ 11 标准库取代,不再鼓励:
Pointer Container : boost/ptr_container, 改用 std::unique_ptr
Array : boost/array.hpp, 改用 std::array
相关文章推荐
- 终于看到了风格优良的C++代码
- [C/C++] C/C++延伸学习系列之STL及Boost库概述
- 向google学习良好的C++代码风格-(1)概述
- c++11 使用c++风格的cast: static_cast<type>(expression) const_cast<type> dynamic_cast reinterpret_cast
- 浅谈C与C++的设计与编程风格(一)
- (翻译)设计Qt风格的C++的应用程序接口 (转载)
- PAT1003.我要通过!(20)(简单的c语言风格c++解法)
- c++ 请抛弃匈牙利命名法 - 变量命名代码风格的建议。
- lua 封装成C++风格的类
- C++风格_函数重载
- 在win32 api程序中:使用C++风格的字符串
- C++服务器开发之基于对象的编程风格
- C++11(及现代C++风格)和快速迭代式开发
- C++boost库之variant使用
- Google C++ 编程风格指南(1):头文件(1)
- C++风格的注释
- 【C++】浅谈boost库智能指针
- Google C++ 风格指南 :尽可能用 sizeof(varname) 代替 sizeof(type).
- 读书笔记(二)---Google C++ 编码风格
- 在win32 api程序中:使用C++风格的字符串