Details
-
Improvement
-
Resolution: Done
-
Major - P3
-
None
-
Fully Compatible
Description
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())
|