Uploaded image for project: 'C++ Standard Library'
  1. C++ Standard Library
  2. STDCXX-375

std::getline() declared in <istream>, but should be declared in <string>

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.1.3, 4.1.4, 4.2.0
    • Fix Version/s: 4.2.1
    • Component/s: 21. Strings
    • Labels:
      None
    • Environment:

      All

    • Patch Info:
      Patch Available
    • Severity:
      Compiler Error

      Description

      The following code fails to compile with errors:

      test.cpp(7) : error C2039: 'getline' : is not a member of 'std'
      test.cpp(7) : error C3861: 'getline': identifier not found, even with argument-dependent lookup

      test.cpp:
      ---------------------------
      #include <string>
      #include <iosfwd>

      void test (std::istream& is)
      {
      std::string str;
      std::getline (is, str);
      }
      ---------------------------

      The addition information here: http://mail-archives.apache.org/mod_mbox/incubator-stdcxx-dev/200703.mbox/%3c7BDB2168BEAEF14C98F1901FD2DE6438594C10@epmsa009.minsk.epam.com%3e

        Attachments

        1. stdcxx-375.patch
          35 kB
          Farid Zaripov

          Activity

            People

            • Assignee:
              farid Farid Zaripov
              Reporter:
              farid Farid Zaripov
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 3h Original Estimate - 3h
                3h
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 10h
                10h