C++ Driver: text.h compilation issues

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: 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
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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:
              DO NOT USE - Backlog - Platform Team
              Reporter:
              Guegant Jean
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: