• // <string>
    template <class charT, class traits, class Alloc>
        basic_istream<charT,traits>& getline (basic_istream<charT,traits>& is,
                                     basic_string<charT,traits,Alloc>& str, charT delim);
    template <class charT, class traits, class Alloc>
        basic_istream<charT,traits>& getline (basic_istream<charT,traits>& is,
                                     basic_string<charT,traits,Alloc>& str);
  • // <string>
    template <class charT, class traits, class Alloc>
        basic_istream<charT,traits>& getline (basic_istream<charT,traits>& is,
                                     basic_string<charT,traits,Alloc>& str, charT delim);
    template <class charT, class traits, class Alloc>
        basic_istream<charT,traits>& getline (basic_istream<charT,traits>&& is,
                                     basic_string<charT,traits,Alloc>& str, charT delim);
    template <class charT, class traits, class Alloc>
        basic_istream<charT,traits>& getline (basic_istream<charT,traits>& is,
                                     basic_string<charT,traits,Alloc>& str);
    template <class charT, class traits, class Alloc>
        basic_istream<charT,traits>& getline (basic_istream<charT,traits>&& is,
                                     basic_string<charT,traits,Alloc>& str);

basic_string 类模板的公共成员函数。从流中读取一行字符。