std::ranges...hunk_by_view(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

std::ranges::chunk_by_view::chunk_by_view πŸ’…

okay bestie, welcome to the C++ Standard Libary manual page for std::ranges::chunk_by_view::chunk_by_view β€” yes, that's the constructor page, and yes, that's literally how the manual spells "Libary" up top 😭. We're keeping it cute and keeping every detail, periodt.


✨ NAME ✨

  • std::ranges::chunk_by_view::chunk_by_view β€”
  • std::ranges::chunk_by_view::chunk_by_view

This is the constructor for chunk_by_view; the page repeats the name because the manual said "twice is nice" πŸ’–.


πŸŒ€ SYNOPSIS πŸŒ€

copying the synopsis exactly, line wraps and all, because we do not mess with code:

          chunk_by_view()

              requires std::default_initializable<V> &&          (1) (since
       C++23)
                       std::default_initializable<Pred>

              = default;
          constexpr explicit chunk_by_view( V base, Pred pred ); (2) (since
       C++23)

okay so this thing constructs a chunk_by_view. That's the whole plot, no cap.

  1. (1) Default constructor. Value-initializes the underlying data members via their respective default member initializers:
    • the view base_ via = V(),
    • the binary predicate pred_ via = Pred(). It's = default; and only there when requires std::default_initializable<V> && std::default_initializable<Pred> β€” since C++23, bestie. ✨
  2. (2) Move constructs the underlying data members:
    • the view base_ with std::move(base),
    • the binary predicate pred_ with std::move(pred). This one is constexpr explicit chunk_by_view( V base, Pred pred );, since C++23. πŸ”₯

🧚 PARAMETERS 🧚

  • base β€” the view to split. πŸͺ“
  • pred β€” the function object (a binary predicate) used as a splitting criteria. 🎯

🌈 EXAMPLE 🌈

This section is incomplete. 😭 Reason: no example.

Not me showing up to the group chat with zero examples... but that's literally what the page says, so we're not inventing one. πŸ™ˆ


🏷️ CATEGORY: 🏷️

  • Todo no example

hugs and kisses from http://cppreference.com, dated 2024.06.10, page std::ranges...hunk_by_view(3) πŸ«ΆπŸ’–

πŸ“¦ where this page comes from