Namespaces
Variants

std::ranges::join_with_view<V,Pattern>:: join_with_view

From cppreference.net
Ranges library
Range adaptors
join_with_view ( )

要求 std:: default_initializable < V > &&

std:: default_initializable < Pattern > = default ;
(1) (C++23 起)
constexpr explicit join_with_view ( V base, Pattern pattern ) ;
(2) (C++23 起)
template < ranges:: input_range R >

要求 std:: constructible_from < V, views:: all_t < R >> &&
std:: constructible_from
< Pattern, ranges:: single_view
< ranges:: range_value_t < /*InnerRng*/ >>>
constexpr explicit join_with_view

( R && r, ranges:: range_value_t < /*InnerRng*/ > e ) ;
(3) (C++23 起)

构造一个 join_with_view ,初始化底层视图 base_ 和存储的模式 pattern_ 。

重载 数据成员
base_ pattern_
(1) 值初始化 值初始化
(2) 使用 std :: move ( base ) 初始化 使用 std :: move ( pattern ) 初始化
(3) 使用 views:: all ( std:: forward < R > ( r ) ) 初始化 使用 views:: single ( std :: move ( e ) ) 初始化

参数

base - 待展开的 ranges 视图
pattern - 用作分隔符的视图
e - 用作分隔符的元素

示例