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...

Комментарии • 7

  • @theintjengineer
    @theintjengineer Год назад +5

    Yay, back with C++ Content. Now we're talking ✌🏽😌

    • @codingwithmat
      @codingwithmat  Год назад +1

      Learning C++ 23 myself, might as well share the journey :)

  • @Lie-1
    @Lie-1 Год назад +1

    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?

    • @codingwithmat
      @codingwithmat  Год назад

      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

  • @Omnifarious0
    @Omnifarious0 11 месяцев назад +1

    And, of course, with a view, you aren't making copies of the elements.

    • @codingwithmat
      @codingwithmat  11 месяцев назад +1

      Indeed, you're viewing the elements! Apologies if I didn't make that clear enough.

    • @Omnifarious0
      @Omnifarious0 11 месяцев назад

      @@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.