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

Remove ODR violating assertion definitions from bson.h

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 2.6.0-rc0
    • None
    • Internal Client
    • None
    • Minor Change

    Description

      The BSON library is no longer useable as a header only library (one example, BSONObj depends by way of BSONObj::_assertInvalid on integerToHex, which is not inline, and only defined in libmongoclient.so; there are almost certainly other examples).

      Since clients must now always link libmongoclient, the alternative assertion definitions in bson.h are ODR likely violations. We should remove the alternative assertion definitions from bson.h, and apply the {redef|unde\f}_macros as are done in dbclient.h

      Attachments

        Activity

          People

            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: