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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 1.5.1
    • Affects Version/s: None
    • Component/s: Internal Client
    • None
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • 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 Stearn
            Reporter:
            Jack Saalweachter
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: