Standard C++ Library Reference ISO/IEC (VERSION3)
char_traits::to_int_type
static int_type to_int_type(const char_type& ch);
The static member function returns ch represented as type int_type. It must be possible to
convert any value ch of type Elem to int_type (by evaluating meta =
to_int_type(ch)) then back to Elem (by evaluating ch = to_char_type(meta)) and
obtain a value that compares equal to ch.
char_traits<char>
template<>
class char_traits<char>;
The class is an explicit specialization of template class char_traits for elements of type char,
(so that it can take advantage of library functions that manipulate objects of this type).
char_traits<wchar_t>
template<>
class char_traits<wchar_t>;
The class is an explicit specialization of template class char_traits for elements of type
wchar_t (so that it can take advantage of library functions that manipulate objects of this type).
getline
template<class Elem, class Tr, class Alloc>
basic_istream<Elem, Tr>& getline(
basic_istream<Elem, Tr>& istr,
basic_string<Elem, Tr, Alloc>& str);
template<class Elem, class Tr, class Alloc>
basic_istream<Elem, Tr>& getline(
basic_istream<Elem, Tr>& istr,
basic_string<Elem, Tr, Alloc>& str,
Elem delim);
The first function returns getline(istr, str, istr.widen('\n')).
The second function replaces the sequence controlled by str with a sequence of elements
extracted from the stream istr. In order of testing, extraction stops:
at end of file1.
after the function extracts an element that compares equal to delim, in which case the
element is neither put back nor appended to the controlled sequence
2.