You don't actually need a functor to bind boost::function. You could just say:

void ignoreObject(const BSONObj& obj);

Also, I'd move this closer to where it is first used.