std::experimental::basic_string_view<CharT,Traits>::to_string, std::experimental::basic_string_view<CharT,Traits>::operator basic_string

template<class Allocator = allocator<CharT>>

basic_string<CharT, Traits, Allocator>

    to_string(const Allocator& a = Allocator()) const;
(库基础 TS)
template<class Allocator>
explicit operator basic_string<CharT, Traits, Allocator>() const;
(库基础 TS)

创建具有当前视图的内容副本的 basic_string

模板形参

Allocator - 用于分配内部存储的分配器 (Allocator) 类型

参数

a - 用于分配新字符串的 Allocator 实例

返回值

包含当前视图的各字符的副本的 basic_string

复杂度

size() 呈线性