-
Type: Task
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: BSON, Documentation
-
None
On mongo-cxx-driver/src/bsoncxx/stdx/make_unique.hpp, when building with MSVC targeted for C++17, we have an error, because of MSVC problem with __cplusplus variable . Because of that, we get the error "Cannot find a valid polyfill for make_unique".
To fix this, we can either:
- Use #elif defined(BSONCXX_POLY_USE_STD) instead of the current #elif __cplusplus >= 201402L
- On CmakeLists.txt add the "/Zc:__cplusplus" to the target_compile_options if the compiler is MSVC and C++17 is ON as a polyfill.