Boost Replaceable by C++11 language features or libraries
来源:互联网 发布:淘宝客服模块代码 编辑:程序博客网 时间:2024/06/06 00:54
Replaceable by C++11 language features or libraries
- Foreach → Range-based for
- Functional/Forward → Perfect forwarding (with rvalue references, variadic templates and std::forward)
- In Place Factory, Typed In Place Factory → Perfect forwarding (at least for the documented use cases)
- Lambda → Lambda expression (in non-polymorphic cases)
- Local function → Lambda expression
- Min-Max → std::minmax, std::minmax_element
- Ratio → std::ratio
- Static Assert → static_assert
- Thread → <thread>, etc (but check this question).
- Typeof → auto, decltype
- Value initialized → List-initialization (§8.5.4/3)
TR1 (they are marked in the documentation if those are TR1 libraries)
- Array → std::array
- Bind → std::bind
- Enable If → std::enable_if
- Function → std::function
- Member Function → std::mem_fn
- Random → <random>
- Ref → std::ref, std::cref
- Regex → <regex>
- Result Of → std::result_of
- Smart Ptr → std::unique_ptr, std::shared_ptr, std::weak_ptr (but boost::intrusive_ptr still cannot be replaced)
- Swap (swapping arrays) → std::swap
- Tuple → std::tuple
- Type Traits → <type_traits>
- Unordered → <unordered_set>, <unordered_map>
Features back-ported from C++11:
- Atomic ← std::atomic
- Chrono ← <chrono> (see below)
- Move ← Rvalue references
Replaceable by C++14/17 language features or libraries (based on http://isocpp.org/blog/2013/04/trip-report-iso-c-spring-2013-meeting)
- Concept check → Concepts Lite
- Filesystem → <filesystem>
- Optional → std::optional
A large part of MPL can be trimmed down or removed using variadic templates. Some common use cases of Lexical cast can be replaced by std::to_string and std::stoX.
Some Boost libraries are related to C++11 but also have some more extensions, e.g.Boost.Functional/Hash contains hash_combine and related functions not found in C++11, Boost.Chronohas I/O and rounding and many other clocks, etc. so you may still want to take a look at the boost ones before really dismissing them.
http://stackoverflow.com/questions/8851670/relevant-boost-features-vs-c11
- Boost Replaceable by C++11 language features or libraries
- Deep Learning Libraries by Language
- Deep Learning Libraries by Language
- 深度学习库Deep Learning Libraries by Language
- Free C or C++ XML Parser Libraries
- Free C or C++ XML Parser Libraries
- Error:Jack is required to support java 8 language features. Either enable Jack or remove sourceCompa
- Error:Jack is required to support java 8 language features. Either enable Jack or remove sourceCompa
- Error:Jack is required to support java 8 language features. Either enable Jack or remove sourceCompa
- Error:Jack is required to support java 8 language features. Either enable Jack or remove sourceCompa
- Error:Jack is required to support java 8 language features. Either enable Jack or remove sourceCompa
- Error:Jack is required to support java 8 language features. Either enable Jack or remove sourceCompa
- Error:Jack is required to support java 8 language features. Either enable Jack or remove...
- Error:Jack is required to support java 8 language features. Either enable Jack or remove sourceCompa
- Error:Jack is required to support java 8 language features. Either enable Jack or remove sourceCompa
- Tandem Features or Bottleneck Features
- Android--Error:Jack is required to support java 8 language features. Either enable Jack or remove so
- Map of Boost libraries
- Android虚拟机Dalvik介绍
- Fujitsu Limited样片申请与经验
- Linux启动过程
- 加班防猝死的十个小建议
- sql学习笔记(一)
- Boost Replaceable by C++11 language features or libraries
- cubieboard python gpio
- CF B. Kolya and Tandem Repeat
- Iphone开发常识
- 各种正则表达式转载
- 机房收费系统数据库设计
- 奇数位于偶数的前面在一个数组中
- VC创建不规则窗口
- myeclipse 红色叹号的原因