Standard C++ Library Reference ISO/IEC (VERSION3)
basic_string::basic_string
basic_string(const value_type *ptr);
basic_string(const value_type *ptr,
const allocator_type& al);
basic_string(const value_type *ptr, size_type count);
basic_string(const value_type *ptr, size_type count,
const allocator_type& al);
basic_string(const basic_string& right);
basic_string(const basic_string& right, size_type roff,
size_type count = npos);
basic_string(const basic_string& right, size_type roff,
size_type count, const allocator_type& al);
basic_string(size_type count, value_type ch);
basic_string(size_type count, value_type ch,
const allocator_type& al);
basic_string();
explicit basic_string(const allocator_type& al);
template <class InIt>
basic_string(InIt first, InIt last);
template <class InIt>
basic_string(InIt first, InIt last, const allocator_type& al);
All constructors store an allocator object and initialize the controlled sequence. The allocator
object is the argument al, if present. For the copy constructor, it is
right.get_allocator(). Otherwise, it is Alloc().
The controlled sequence is initialized to a copy of the operand sequence specified by the
remaining operands. A constructor with no operand sequence specifies an empty initial controlled
sequence. If InIt is an integer type in a template constructor, the operand sequence first,
last behaves the same as (size_type)first, (value_type)last.
In this implementation, if a translator does not support member template functions, the templates:
template <class InIt>
basic_string(InIt first, InIt last);
template <class InIt>
basic_string(InIt first, InIt last,
const allocator_type& al);
are replaced by:
basic_string(const_pointer first, const_pointer last);
basic_string(const_pointer first, const_pointer last,
const allocator_type& al);