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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.5.1
    • Component/s: Internal Client
    • Labels:
      None

      Description

      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

        Attachments

          Activity

            People

            • Votes:
              2 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: