• // <string>
    // 默认(1)	
    explicit basic_string (const allocator_type& alloc = allocator_type());
    // 拷贝(2)	
    basic_string (const basic_string& str);
    // 子串(3)	
    basic_string (const basic_string& str, size_type pos, size_type len = npos,
                  const allocator_type& alloc = allocator_type());
    // 来自 C 型字符串(4)
    basic_string (const charT* s, const allocator_type& alloc = allocator_type());
    // from sequence(5)	
    basic_string (const charT* s, size_type n,
                  const allocator_type& alloc = allocator_type());
    // 填充(6)	
    basic_string (size_type n, charT c,
                  const allocator_type& alloc = allocator_type());
    // 范围(7)	
    template <class InputIterator>
        basic_string  (InputIterator first, InputIterator last,
                       const allocator_type& alloc = allocator_type());
  • // <string>
    // 默认(1)
    explicit basic_string (const allocator_type& alloc = allocator_type());
    // 拷贝(2)	
    basic_string (const basic_string& str);
    basic_string (const basic_string& str, const allocator_type& alloc);
    // 子串(3)	
    basic_string (const basic_string& str, size_type pos, size_type len = npos,
                  const allocator_type& alloc = allocator_type());
    // 来自 C 型字符串(4)	
    basic_string (const charT* s, const allocator_type& alloc = allocator_type());
    // from buffer (5)	
    basic_string (const charT* s, size_type n,
                  const allocator_type& alloc = allocator_type());
    // 填充(6)	
    basic_string (size_type n, charT c,
                  const allocator_type& alloc = allocator_type());
    // 范围(7)	
    template <class InputIterator>
        basic_string  (InputIterator first, InputIterator last,
                       const allocator_type& alloc = allocator_type());
    // 初始化列表(8)
    basic_string (initializer_list<charT> il,
                  const allocator_type& alloc = allocator_type());
    // 移动(9)	
    basic_string (basic_string&& str) noexcept;
    basic_string (basic_string&& str, const allocator_type& alloc);

创建一个 basic_string 对象并将其初始化。