owned this note changed 5 years ago
Linked with GitHub

The C++20 Range Library: from Range-v3 to the future - Po Yen Chen

tags: COSCUP2020 中階 TR313

歡迎來到 https://hackmd.io/@coscup/2020 共筆

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

點擊本頁上方的 開始用 Markdown 一起寫筆記!
手機版請點選上方 按鈕展開議程列表。

請從這裡開始
Slide : https://slides.com/loveme00835/coscup2020/fullscreen#/1/1

  • the range in C++ STL is composed of 2 iterators

    • the 2 iterators no need to be of the same type
  • Iterator categories

    • input iterator: could be dereferenced / can be dereferenced as rvalue
    • output iterator: could be assigned / can be dereferenced as lvalue
    • forward iterator: can be incremented
  • Range could be concrete

    • iterators of owning-semantics
      • e.g. container (vector)
    • iterators of non-owning-semantics
      • e.g. view (span, string_view)
  • Range could be abstract

    • e.g. iterators of istream (non-owning)
  • Ragne is concept of encapulate 2 iterators (begin, end) into a class

    • iterator-based library -> range-based library
    • pros: slides pg.3-1, 3-2, 4-1
Select a repo