[CXX-1952] Mongo-cxx-driver compile failed with a future version of MSVC Created: 04/Mar/20 Updated: 11/Jun/20 Resolved: 11/Jun/20 |
|
| Status: | Closed |
| Project: | C++ Driver |
| Component/s: | None |
| Affects Version/s: | 3.4.0, 3.4.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Cheney Wang | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Windows |
||
| Issue Links: |
|
||||||||
| 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.
|
| Comments |
| Comment by Kevin Albertson [ 11/Jun/20 ] |
|
This appears to be a duplicate of |
| Comment by Kevin Albertson [ 26/May/20 ] |
|
Related to https://github.com/mongodb/mongo-cxx-driver/pull/654/ |
| Comment by Cheney Wang [ 11/Mar/20 ] |
|
The GitHub have this change: https://github.com/microsoft/STL/pull/390/files , so you can the latest source from GitHub to replace the local files, then you can reproduce this issue successfully. |
| Comment by Kevin Albertson [ 09/Mar/20 ] |
|
Hi 850426846@qq.com, Thanks for the report! Do you know of another way to reproduce this compilation error outside of an internal version of Visual Studio? Otherwise, we may not be able to reproduce the compilation failure at the moment. Thanks, |