Uploaded image for project: 'C++ Driver'
  1. C++ Driver
  2. CXX-1296

Call to overloaded operator scoped_bson_t ambiguous

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Works as Designed
    • Affects Version/s: 3.1.1
    • Fix Version/s: None
    • Component/s: Portability
    • Labels:
      None
    • Environment:
      Gentoo, gcc 6.3.0

      Description

      While trying to build mongo-cxx-driver as:

      cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=yes -DCMAKE_CXX_STANDARD=17 -DCMAKE_INSTALL_PREFIX=/usr -DBSONCXX_POLY_USE_MNMLSTC=no -DBSONCXX_POLY_USE_STD_EXPERIMENTAL=1

      the build fails with following errors:

      /home/amitprakash/mongocxx/mongo-cxx-driver-r3.1.1/src/mongocxx/bulk_write.cpp: In member function ‘void mongocxx::v_noabi::bulk_write::append(const mongocxx::v_noabi::model::write&)’:
      /home/amitprakash/mongocxx/mongo-cxx-driver-r3.1.1/src/mongocxx/bulk_write.cpp:69:88: error: call of overloaded ‘scoped_bson_t(std::enable_if<true, bsoncxx::v_noabi::document::value>::type)’ is ambiguous
      scoped_bson_t options(options_builder << bsoncxx::builder::stream::finalize);
      ^
      In file included from /home/amitprakash/mongocxx/mongo-cxx-driver-r3.1.1/src/mongocxx/bulk_write.cpp:21:0:
      /home/amitprakash/mongocxx/mongo-cxx-driver-r3.1.1/src/mongocxx/private/libbson.hh:68:5: note: candidate: mongocxx::v_noabi::libbson::scoped_bson_t::scoped_bson_t(std::experimental::fundamentals_v1::optional<bsoncxx::v_noabi::view_or_value<bsoncxx::v_noabi::document::view, bsoncxx::v_noabi::document::value> >)
      scoped_bson_t(bsoncxx::stdx::optional<bsoncxx::document::view_or_value> doc);
      ^~~~~~~~~~~~~
      /home/amitprakash/mongocxx/mongo-cxx-driver-r3.1.1/src/mongocxx/private/libbson.hh:61:14: note: candidate: mongocxx::v_noabi::libbson::scoped_bson_t::scoped_bson_t(bsoncxx::v_noabi::document::view_or_value)
      explicit scoped_bson_t(bsoncxx::document::view_or_value doc);
      ^~~~~~~~~~~~~
      /home/amitprakash/mongocxx/mongo-cxx-driver-r3.1.1/src/mongocxx/bulk_write.cpp:90:88: error: call of overloaded ‘scoped_bson_t(std::enable_if<true, bsoncxx::v_noabi::document::value>::type)’ is ambiguous
      scoped_bson_t options(options_builder << bsoncxx::builder::stream::finalize);
      ^
      In file included from /home/amitprakash/mongocxx/mongo-cxx-driver-r3.1.1/src/mongocxx/bulk_write.cpp:21:0:
      /home/amitprakash/mongocxx/mongo-cxx-driver-r3.1.1/src/mongocxx/private/libbson.hh:68:5: note: candidate: mongocxx::v_noabi::libbson::scoped_bson_t::scoped_bson_t(std::experimental::fundamentals_v1::optional<bsoncxx::v_noabi::view_or_value<bsoncxx::v_noabi::document::view, bsoncxx::v_noabi::document::value> >)
      scoped_bson_t(bsoncxx::stdx::optional<bsoncxx::document::view_or_value> doc);
      ^~~~~~~~~~~~~
      /home/amitprakash/mongocxx/mongo-cxx-driver-r3.1.1/src/mongocxx/private/libbson.hh:61:14: note: candidate: mongocxx::v_noabi::libbson::scoped_bson_t::scoped_bson_t(bsoncxx::v_noabi::document::view_or_value)
      explicit scoped_bson_t(bsoncxx::document::view_or_value doc);
      etc

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: