Namespaces
Variants

std::ranges::lazy_split_view<V,Pattern>:: base

From cppreference.net
Ranges library
Range adaptors
constexpr V base ( ) const & requires std:: copy_constructible < V > ;
(1) (C++20 이후)
constexpr V base ( ) && ;
(2) (C++20 이후)

기본 뷰 base_ 의 복사본을 반환합니다.

1) 기본 뷰 base_ 에서 결과를 복사 생성합니다.
2) 기본 뷰 base_ 에서 결과를 이동 생성합니다.

반환값

기본 뷰의 복사본 base_ .

예제

#include <iostream>
#include <ranges>
#include <string_view>
void print(std::string_view rem, auto const& r, std::string_view post = "\n")
{
    for (std::cout << rem; auto const& e : r)
        std::cout << e;
    std::cout << post;
}
int main()
{
    constexpr std::string_view keywords{ "this,..throw,..true,..try,.." };
    constexpr std::string_view pattern{",.."};
    constexpr std::ranges::lazy_split_view lazy_split_view{keywords, pattern};
    print("base() = [", lazy_split_view.base(), "]\n"
          "substrings: ");
    for (auto const& split: lazy_split_view)
        print("[", split, "] ");
}

출력:

base() = [this,..throw,..true,..try,..]
substrings: [this] [throw] [true] [try] []

참고 항목

기본(적응된) 뷰의 복사본을 반환합니다
( std::ranges::split_view<V,Pattern> 의 public 멤버 함수)