Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add C++20 Supports #1

Open
16 of 31 tasks
changkun opened this issue Mar 26, 2018 · 6 comments
Open
16 of 31 tasks

Add C++20 Supports #1

changkun opened this issue Mar 26, 2018 · 6 comments
Assignees
Labels

Comments

@changkun
Copy link
Owner

changkun commented Mar 26, 2018

需要支持以下内容:

  • 语言级 bug 与修订
  • 类型系统改进 Type Punning
  • 弃用和删除的功能
    • register
    • std::auto_ptr --> std::unique_ptr
    • std::random_shuffle
    • std::bind1st, std::bind2nd, ...
  • 语言增强
  • 结构化绑定 Structured bindings
  • 新的控制结构 constexpr if
  • 编译时条件语句 Compile-time conditional statements
  • 新的聚合规则
  • 强制性 RVO 和复制 elision, Guaranteed copy elision
  • Unary static_assert
  • 嵌套命名空间 Nested namespace deinitions
  • inline 变量 inline variables
  • constexpr 改进, constexpr lambda
  • 模板增强
  • 折叠表达式 Fold expressions
  • 类模板参数推导 Class template deduction
  • variadic templates fold
  • auto non-type template parameters
  • Preprocessor predicate for header testing
  • 容器
  • std::string_view, std::byte 加入 container 容器一章
  • std::any, std::variant, std::optional 加入 container 容器一章
  • 容器改进
  • 线程
  • 文件系统
  • 数学库
  • 其他特性
  • Polymorphic allocators and memory resources
  • Aligned new
  • Improved insertion and splicing for associative constrainers
  • Boolean logic metafunctions
    ...
  • 展望 C++20
  • concept
  • module
  • coroutine
  • Ranges
@changkun changkun changed the title 增加对 C++17 的支持 增加对 C++17 的支持(发布第二版) Mar 26, 2018
@changkun changkun self-assigned this Mar 30, 2018
changkun added a commit that referenced this issue Apr 7, 2018
changkun added a commit that referenced this issue Apr 7, 2018
@changkun changkun pinned this issue Dec 19, 2018
@changkun changkun changed the title 增加对 C++17 的支持(发布第二版) 增加对 C++20 的支持(发布第二版) Feb 26, 2019
changkun added a commit that referenced this issue Jul 11, 2019
@changkun changkun changed the title 增加对 C++20 的支持(发布第二版) 增加对 C++20 的支持 Jul 20, 2019
changkun added a commit that referenced this issue Jul 20, 2019
@changkun changkun changed the title 增加对 C++20 的支持 Add C++20 Supports Jul 20, 2019
@changkun changkun added v2.0 and removed enhancement labels Jul 20, 2019
@kassane
Copy link

kassane commented Apr 12, 2020

Suggestion for C++20 ranges:

Ranges:

The ranges library provides a new way of working with ranges of elements. To use them,
you should include the header file. Let's look at ranges with an example. A
range is a sequence of elements having a beginning and an end. It provides a begin iterator
and an end sentinel. Consider the following vector of integers:

#include <vector>
int main()
{
    std::vector<int> elements{0, 1, 2, 3, 4, 5, 6};
}

Ranges accompanied by range adapters (the | operator) provide powerful functionality to
deal with a range of elements. For example, examine the following code:

#include <vector>
#include <ranges> //works in GCC 10.1(current)
int main()
{
    std::vector<int> elements{0, 1, 2, 3, 4, 5, 6};
    for (int current : elements | std::ranges::view::filter([](int e) { return
         e % 2 == 0; }))
  {
      std::cout << current << " ";
  }
}

@changkun
Copy link
Owner Author

@kassane Thank you so much!

@Peilix
Copy link

Peilix commented Oct 22, 2020

@changkun 方便发布一版中文的EPUB吗 dalao

@changkun
Copy link
Owner Author

@Sunbreak
Copy link

Any progress?

@changkun
Copy link
Owner Author

PR welcome

@cathaysia cathaysia mentioned this issue Sep 4, 2021
Repository owner deleted a comment from RigoLigoRLC May 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants