Git Product home page Git Product logo

cpp_new_features's Introduction

cpp_new_features

2021年最新整理,500个c++11/14/17/20/23的新特性代码案例,包含lambda匿名函数,右值引用,auto,coroutine库,synchronization库,持续更新中......


C++新特性


C++11新特性

关键字

新增关键字

含义变化或者新增含义关键字(meaning changed or new meaning added)

类型支持(基本类型、RTTI、类型特性)

Defined in header <type_traits>

STL容器

无序容器

元组std::tuple

hash

智能指针


正则表达式


函数

非静态成员函数

函数对象模板


模板


原子操作


线程


异常


错误


新语法

预处理

C++宏(cplusplus macro)

基于范围的for语句

对齐支持(alignment support)

显式转换操作符(explicit conversion operators)

静态断言(static assert)
  • 语法:static_assert(常量表达式,"提示字符串")

  • static assert

数字限制(numeric limits)

原始字符串(raw string)

追踪返回类型语法(trailing return type syntax)

扩展的friend语法(extended friend syntax)

扩展的整型(extended integer types)

非受限联合体(unrestricted union)

内联名字空间(lnline namespace)

用户定义的字面量(user-defined literals)

强类型枚举(scoped and strongly typed enums)

随机装置(random device)

std::ref和std::cref

常量表达式(constexpr)

lamda表达式

指针空值(nullptr)

防止类型收窄(Preventing narrowing)

初始化列表(initializer lists)

统一的初始化语法和语义(Uniform initialization syntax and semantics)

POD(plain old data)

long long整型

移动语义(move semantics)

右值引用(rvalue reference)

c99特性(c99)

一般化的SFINAE规则(generalized SFINAE rules)

C++14新特性

类型支持(基本类型、RTTI、类型特性)

Defined in header<type_traits>

Defined in header<utility>

Defined in header<initializer_list>

Defined in header<iterator>

Defined in namespace std

Defined in header <array>

Defined in header <deque>

Defined in header <forward_list>

Defined in header <iterator>

Defined in header <list>

Defined in header <map>

Defined in header <regex>

Defined in header <set>

Defined in header <span>

Defined in header <string>

Defined in header <string_view>

Defined in header <unordered_map>

Defined in header <unordered_set>

Defined in header <vector>

Defined in namespace std

C++17新特性

关键字

含义变化或者新增含义关键字(meaning changed or new meaning added)

类型支持(基本类型、RTTI、类型特性)

Defined in header<type_traits>

Defined in header<utility>

Defined in header<tuple>

Defined in header<optional>

Defined in header<variant>

Defined in header<any>

Defined in header<charconv>

Defined in header<initializer_list>

容器库

Defined in header<map>

Defined in header<unordered_map>

Defined in header <array>

Defined in header <deque>

Defined in header <forward_list>

Defined in header <iterator>

Defined in header <list>

Defined in header <map>

Defined in header <regex>

Defined in header <set>

Defined in header <span>

Defined in header <string>

Defined in header <string_view>

Defined in header <unordered_map>

Defined in header <unordered_set>

Defined in header <vector>

Defined in namespace std

C++20新特性

关键字

新增关键字

含义变化或者新增含义关键字(meaning changed or new meaning added)

类型支持(基本类型、RTTI、类型特性)

Defined in header<type_traits>

协程支持

Defined in header<coroutine>

三路比较

Defined in header<compare>

Defined in header<concepts>

Defined in header<utility>

Defined in header<memory>

Concepts library(概念库)

Defined in header<concepts>

动态内存管理

Defined in header<memory>

日期和时间工具

Defined in header<chrono>

字符串

Defined in header<string>

Defined in header<string_view>

Defined in header<cuchar>

容器库

Defined in header<array>

Defined in header<vector>

Defined in header<map>

Defined in header<unordered_map>

Defined in header<span>

Defined in namespace std

Defined in namespace std::ranges

Defined in namespace std

Defined in header

Defined in namespace std

Defined in header

Defined in header <array>

Defined in header <deque>

Defined in header <forward_list>

Defined in header <iterator>

Defined in header <list>

Defined in header <map>

Defined in header <regex>

Defined in header <set>

Defined in header <span>

Defined in header <string>

Defined in header <string_view>

Defined in header <unordered_map>

Defined in header <unordered_set>

Defined in header <vector>

Defined in namespace std

Defined in header <ranges>

Defined in header <iterator>

Defined in namespace std::ranges

C++23新特性

类型支持(基本类型、RTTI、类型特性)

Defined in header<type_traits>

Defined in header<utility>

Defined in header<stacktrace>

动态内存管理

Defined in header<memory>

字符串

Defined in header<string>

Defined in header<string_view>

联系专栏

零声教育,专注于c/c++Linux后台服务器开发架构技术学习提升。

每天晚上8点【免费技术直播】:分享Linux,Nginx,ZeroMQ,MySQL,Redis,fastdfs,MongoDB,ZK,流媒体,CDN,P2P,K8S,Docker,TCP/IP,协程,DPDK等技术内容,立即学习。

2、免费订阅直播链接【添加WX: cz1625358265】即可领取对标腾讯T9职级技术要求的后台开发学习图谱。

大纲部分图.png

微信扫码联系VIP课程咨询橙子老师,免费领取更多福利干货资料【备注:C++新特性】

barcode

cpp_new_features's People

Contributors

ls-brynn avatar wangbojing avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.