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

XMLWordPrintableJSON

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

      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
            Reporter:
            Cheney Wang
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: