November 2001
Beginner
1128 pages
29h 12m
English
The basic_string template defines several types that are used later in defining the methods:
typedef traits traits_type; typedef typename traits::char_type value_type; typedef Allocator allocator_type; typedef typename Allocator::size_type size_type; typedef typename Allocator::difference_type difference_type; typedef typename Allocator::reference reference; typedef typename Allocator::const_reference const_reference; typedef typename Allocator::pointer pointer; typedef typename Allocator::const_pointer const_pointer;
Note that traits is a template parameter that will correspond to some specific type, such as char_traits<char>; traits_type will become a typedef for that specific type. The notation:
typedef typename ...
Read now
Unlock full access