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

C++ Driver: text.h compilation issues

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Trivial - P5 Trivial - P5
    • None
    • Affects Version/s: None
    • Component/s: Internal Client
    • Environment:
      Windows 7, Visual C++ 2012 Update 3, mongo-cxx-driver-v2.4
    • Fully Compatible

      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")"

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

              Created:
              Updated:
              Resolved: