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

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

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.4.0, 3.4.1
    • Component/s: None
    • None
    • Environment:
      Windows

      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.

       

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

              Created:
              Updated:
              Resolved: