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

Mongo-cxx-driver compile failed with a future version of MSVC

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Duplicate
    • 3.4.0, 3.4.1
    • None
    • None
    • None
    • Windows

    Description

      Hello, I'm a member of Microsoft VCPKG, when I built this port in an internal version of Visual Studio, it failed with following errors:

      mongocxx\instance.cpp(79): error C2338: Must be trivially constructible

      Line79:                 static_assert(std::is_trivially_constructible<decltype(current_instance)>::value, "Must be trivially constructible");

      Since there is a static_assert that std::atomic is trivially constructible, then the code need to be fixed to handle the adoption of http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p0883r2.pdf which makes atomic have a constructor that value-initializes the contained T.

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              850426846@qq.com Cheney Wang
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: