Reputation: 5329
It seems that the mongo-cxx-driver
VCPKG package cannot be built without the C++17 polyfills, so when you install the MongoDB C++ driver from VCPKG, you are forced to use non-standard implementations of std::optional
and std::string_view
, which is not recommended, unless you have to build with an ancient compiler.
Also, recently, there seems to have been a change in the MongoDB C++ driver code, which causes the polyfills to no longer be aliases for the standard types but actual distinct types that are not implicitly convertible to the standard types.
This breaks some of our code, and the only code solution seems to require cluttering up our code with explicit conversions to the standard types.
There seem to be ways to override the C++ language standard compiler option or CMake variables with VCPKG, but these seem to be complicated, and certain policies of VCPKG seem to be in the way of making this easy or even possible.
Has anyone solved this problem, and are there any instructions for it anywhere, or does MongoDB have any intentions of solving this on their side?
Upvotes: 3
Views: 36