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

C++ Driver: text.h compilation issues

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Trivial - P5
    • Resolution: Gone away
    • None
    • None
    • Internal Client
    • Windows 7, Visual C++ 2012 Update 3, mongo-cxx-driver-v2.4
    • Fully Compatible

    Description

      In VC++, the "#error temp error" directive at line 75 in file "mongo/util/text.h" isn't well interpreted.
      This lead to a confusing error C1004:
      "src\mongo/util/text.h(75) : fatal error C1004: unexpected end-of-file found"

      Using the directive "#error" in an header file could be the result of this weird behaviour. See the report: http://connect.microsoft.com/VisualStudio/feedback/details/757886/c1004-instead-of-c1189-when-error-is-in-a-header

      What I suggest is to add a "#pragma warning" before the "#error", like:
      "#pragma message (_FILE_": temp error")"

      Attachments

        Activity

          People

            backlog-server-platform DO NOT USE - Backlog - Platform Team
            jiwan Guegant Jean
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: