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

don't use assert, but verify

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • Internal Client
    • None
    • linux

    Description

      In the current master version, this wont compile:

      #include <assert.h>
      #include "mongo/client/dbclient.h"
      int main()
      {
      assert(0);
      return 0;
      }

      I just get the following error:

      test.cpp: In function 'int main()':
      test.cpp:5: error: 'assert' was not declared in this scope

      I looks like mongo redefines the assert macro, this is an unexpected, and undesired side effect.

      Attachments

        Activity

          People

            eliot Eliot Horowitz (Inactive)
            jesperhansen Jesper Hansen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: