don't use assert, but verify

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Duplicate
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Internal Client
    • None
    • Environment:
      linux
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

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

              Created:
              Updated:
              Resolved: