[SERVER-12604] Remove ODR violating assertion definitions from bson.h Created: 04/Feb/14  Updated: 11/Jul/16  Resolved: 05/Feb/14

Status: Closed
Project: Core Server
Component/s: Internal Client
Affects Version/s: None
Fix Version/s: 2.6.0-rc0

Type: Task Priority: Major - P3
Reporter: Andrew Morrow (Inactive) Assignee: Andrew Morrow (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Minor Change
Participants:

 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



 Comments   
Comment by Githook User [ 05/Feb/14 ]

Author:

{u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@10gen.com'}

Message: SERVER-12604 Remove header-only assert macro definitions from bson.h
Branch: master
https://github.com/mongodb/mongo/commit/9f248cc6a4f885aa33cacbcaeb34cb24de7f1ac3

Generated at Thu Feb 08 03:29:01 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.