-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Comments
Suggestion for C++20 ranges: Ranges:The ranges library provides a new way of working with ranges of elements. To use them, #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 #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 << " ";
}
} |
@kassane Thank you so much! |
@changkun 方便发布一版中文的EPUB吗 dalao |
Any progress? |
PR welcome |
需要支持以下内容:
constexpr
ifstatic_assert
inline
variablesconstexpr
改进, constexpr lambdaauto
non-type template parametersPreprocessor predicate for header testingstd::string_view
,std::byte
加入 container 容器一章std::any
,std::variant
,std::optional
加入 container 容器一章std::shared_mutex
,atomic<T>::is_always_lockfree
,scoped_lock<Mutexes...>
new
...
The text was updated successfully, but these errors were encountered: