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

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 2.1.0
    • None
    • Internal Client
    • None
    • All
    • ALL

    Description

      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)

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: