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

Can't include bson/bson.h and client/connpool.h in same file due to msgasserted conflict

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.1.0
    • Affects Version/s: None
    • Component/s: Internal Client
    • Labels:
      None
    • Environment:
      All
    • ALL

      Given the current git head, the following file will not compile:

      #include <cmath>
      #include <cstring>
      #include <mongo/bson/bson.h>
      #include <mongo/client/connpool.h>

      It fails as follows:

      In file included from /afs/acr/users/acm/mongo.temp.install/include/mongo/client/../util/../util/../db/../util/optime.h:20,
      from /afs/acr/users/acm/mongo.temp.install/include/mongo/client/../util/../util/../db/jsobj.h:33,
      from /afs/acr/users/acm/mongo.temp.install/include/mongo/client/../util/../util/sock.h:25,
      from /afs/acr/users/acm/mongo.temp.install/include/mongo/client/../util/message.h:20,
      from /afs/acr/users/acm/mongo.temp.install/include/mongo/client/dbclient.h:21,
      from /afs/acr/users/acm/mongo.temp.install/include/mongo/client/connpool.h:21,
      from ./header_check.cc:4:
      /afs/acr/users/acm/mongo.temp.install/include/mongo/client/../util/../util/../db/../util/../db/concurrency.h: In member function 'bool mongo::MongoMutex::_checkWriteLockAlready()':
      /afs/acr/users/acm/mongo.temp.install/include/mongo/client/../util/../util/../db/../util/../db/concurrency.h:115: error: call of overloaded 'msgasserted(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)' is ambiguous
      /afs/acr/users/acm/mongo.temp.install/include/mongo/bson/bson.h:66: note: candidates are: void mongo::msgasserted(int, const std::string&)
      /afs/acr/users/acm/mongo.temp.install/include/mongo/client/../util/assert_util.h:173: note: void mongo::msgasserted(int, std::string)

            Assignee:
            milkie@mongodb.com Eric Milkie
            Reporter:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: