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
2023/four-views-in-cpp23/ #130
Comments
I know that it's not the main purpose of this article, but in the function for (int i = 0; i < rows; ++i)
for (int j = 0; j < cols; ++j)
if (matrix[i, j] != (i == j ? 1 : 0))
return false; |
The |
@dhollman who authored |
Thanks @Ukilele ! I've just updated the code and now the example is better... and compiling :) |
thanks! |
Spans, string_view, and Ranges - Four View types (C++17 to C++23) - C++ Stories
In this blog post, we’ll look at several different view/reference types introduced in Modern C++. The first one is string_view added in C++17. C++20 brought std::span and ranges views. The last addition is std::mdspan from C++23.
Let’s start.
String View (C++17) The std::string_view type is a non-owning reference to a string.
https://www.cppstories.com/2023/four-views-in-cpp23/
The text was updated successfully, but these errors were encountered: