-
Type:
Improvement
-
Resolution: Done
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: Internal Client
-
Fully Compatible
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
If there is a cascaded mongo namespace in your project BSON and BSON_ARRAY macros won't work any more.
namespace foo { namespace mongo {
void bar()
{
::mongo::BSONObj bo = BSON("id" << 1);
}
} }
The macro should use ::mongo instead
#define BSON(x) (( ::mongo::BSONObjBuilder(64) << x ).obj()) #define BSON_ARRAY(x) (( ::mongo::BSONArrayBuilder() << x ).arr())