Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-32434

operator<<(ostream,StringData) ignores stream state.

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Minor - P4
    • Resolution: Fixed
    • None
    • 4.3.1
    • Portability
    • None
    • Fully Compatible
    • Dev Tools 2019-07-15

    Description

      ostream << std::setw(5) << expr

      behaves differently depending on whether expr is a std::string or a StringData.

      libc++'s operator<<(ostream, string_view) is complex, but accessible for reuse.
      https://github.com/llvm-mirror/libcxx/blob/0f25cd9/include/ostream#L714

      Attachments

        Activity

          People

            billy.donahue@mongodb.com Billy Donahue
            billy.donahue@mongodb.com Billy Donahue
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: