Sliding Window to Arrays with C++23's std::views::slide
HTML-код
- Опубликовано: 20 сен 2024
- Cpp23 brings many modern concepts to the C++ standard. An example of a feature that can speed up your development time is the std::views::slide ranges, which when used with an array, vector, or any other collection (range), it creates a sliding window with element references.
In this video, we look at a very naive implementation of std::views::slide so you can see how much work this feature is saving you.
std::ranges::views::slide & slide_view documentation - en.cppreferenc...
making partitions with std::views::chunk_view - en.cppreferenc...
Yay, back with C++ Content. Now we're talking ✌🏽😌
Learning C++ 23 myself, might as well share the journey :)
Hello, I saw in your video you were working with the bibiloteca portaudio, I don't know how to install it. Could you help me?
Hello, sorry for not replying I must have missed this comment. Please join the discord and I can assist you in there ! Thanks for watching
And, of course, with a view, you aren't making copies of the elements.
Indeed, you're viewing the elements! Apologies if I didn't make that clear enough.
@@codingwithmat - I thought it could've been clearer, mostly because all of your examples from other languages did. 🙂
I do think it was an excellent treatment of the subject though.