template < class charT, class traits = char_traits<charT>, // basic_string::traits_type class Alloc = allocator<charT> // basic_string::allocator_type > class basic_string;
member type | definition | notes |
---|---|---|
traits_type | The second template parameter (traits) | defaults to: char_traits<charT> |
allocator_type | The third template parameter (Alloc) | defaults to: allocator<charT> |
value_type | traits_type::char_type | shall be the same as charT |
reference | allocator_type::reference | for the default allocator: charT& |
const_reference | allocator_type::const_reference | for the default allocator: const charT& |
pointer | allocator_type::pointer | for the default allocator: charT* |
const_pointer | allocator_type::const_pointer | for the default allocator: const charT* |
iterator | a random access iterator to charT | convertible to const_iterator |
const_iterator | a random access iterator to const charT | |
reverse_iterator | reverse_iterator<iterator> | |
const_reverse_iterator | reverse_iterator<const_iterator> | |
difference_type | allocator_type::difference_type | usually the same as ptrdiff_t |
size_type | allocator_type::difference_type | usually the same as size_t |
member type | definition | notes |
---|---|---|
traits_type | The second template parameter (traits) | defaults to: char_traits<charT> |
allocator_type | The third template parameter (Alloc) | defaults to: allocator<charT> |
value_type | traits_type::char_type | shall be the same as charT |
reference | value_type& | |
const_reference | const value_type& | |
pointer | allocator_traits<allocator_type>::pointer | for the default allocator: charT* |
const_pointer | allocator_traits<allocator_type>::const_pointer | for the default allocator: const charT* |
iterator | a random access iterator to charT | convertible to const_iterator |
const_iterator | a random access iterator to const charT | |
reverse_iterator | reverse_iterator<iterator> | |
const_reverse_iterator | reverse_iterator<const_iterator> | |
difference_type | allocator_traits<allocator_type>::difference_type | usually the same as ptrdiff_t |
size_type | allocator_traits<allocator_type>::difference_type | usually the same as size_t |