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

don't pollute global namespaces ( WAS: Mongo #assert squashes other asserts)

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.5.1
    • Affects Version/s: None
    • Component/s: Internal Client
    • Labels:
      None

      When you try to assert something in a file which includes dbclient.h, the mongo assert replaces other asserts which may have been declared.

      EXAMPLE:

      foo.cc:
      #include <cassert>
      #include <mongo/client/dbclient.h>

      int main() {
      assert(false);
      }

      YIELDS:

      > g++ foo.cc -o foo
      foo.cc: In function 'int main()':
      foo.cc:5: error: 'asserted' was not declared in this scope

            Assignee:
            mathias@mongodb.com Mathias Stearn
            Reporter:
            jack Jack Saalweachter
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: