All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Changes prior to 3.9.0 are documented as release notes on GitHub.
FetchContent_MakeAvailable()
is used to populate dependencies instead ofFetchContent_Populate()
for the Mongo C Driver (when not provided byCMAKE_PREFIX_PATH
) and mnmlstc/core (when automatically selected or whenBSONCXX_POLY_USE_MNMLSTC=ON
).- Note:
FetchContent_Populate()
is still used for mnmlstc/core for CMake versions prior to 3.18 to avoidadd_subdirectory()
behavior.
- Note:
- Test suite now uses Catch2 v3 via FetchContent instead of the bundled Catch2 v2 standalone header.
- C++14 or newer is now required to build tests when enabled with
ENABLE_TESTS=ON
.
- C++14 or newer is now required to build tests when enabled with
- Deprecate use of the
bsoncxx/util/functor.hpp
header. - A future minor release plans to raise the minimum supported MongoDB Server version from 3.6 to 4.0. This is in accordance with MongoDB Software Lifecycle Schedules.
- Export of private member functions in bsoncxx:
bsoncxx::v_noabi::types::bson_value::value::value(const uint8_t*, uint32_t, uint32_t, uint32_t)
bsoncxx::v_noabi::types::bson_value::view::_init(void*)
bsoncxx::v_noabi::types::bson_value::view::view(const uint8_t*, uint32_t, uint32_t, uint32_t)
bsoncxx::v_noabi::types::bson_value::view::view(void*)
- Export of private member functions in mongocxx:
mongocxx::v_noabi::options::change_stream::as_bson()
mongocxx::v_noabi::options::aggregate::append(bsoncxx::v_noabi::builder::basic::document&)
mongocxx::v_noabi::options::index::storage_options()
- SSDLC Compliance Report and related release artifacts.
- Undefined behavior when moving a
mongocxx::v_noabi::events::topology_description::server_descriptions
object due to uninitialized data member access.
- (MSVC only) The name of the libbsoncxx package in the "Requires" field of the libmongocxx pkg-config file incorrectly used the library output name instead of the pkg-config package name when
ENABLE_ABI_TAG_IN_PKGCONFIG_FILENAMES=OFF
. - (MSVC only) The translation of the
MSVC_RUNTIME_LIBRARY
target property into an ABI tag parameter in library and package filenames did not account for generator expressions.
- Forward headers providing non-defining declarations of bsoncxx and mongocxx class types.
- Note: user-defined forward declarations of any library entity has not been, and is still not, supported. To obtain the declaration or definition of a library entity, always include the corresponding header.
- The CMake option
ENABLE_BSONCXX_USE_POLY_IMPLS
(OFF by default) allows selecting bsoncxx implementations of C++17 polyfills by default when no polyfill library is requested. - The CMake option
BSONCXX_POLY_USE_IMPLS
(OFF by default) allows selecting bsoncxx implementations of C++17 polyfills instead of external libraries or the C++ standard library.
- The
bsoncxx::v_noabi
andmongocxx::v_noabi
namespaces are no longer declaredinline
.- This change is not expected to break source or binary compatibility, but is nevertheless documented here due to its significance. If this change does inadvertently break source or binary compatibility, please submit a bug report.
- Root namespace declarations are still supported and expected to remain equivalent to their prior definitions (e.g.
bsoncxx::document
is still equivalent tobsoncxx::v_noabi::document
,mongocxx::client
is still equivalent tomongocxx::v_noabi::client
, etc.). Argument-dependent lookup and template instantiations are expected to remain equivalent to their prior behavior. - Note: user-defined forward declarations of any library entity has not been, and is still not, supported. To obtain the declaration or definition of a library entity, always include the corresponding header.
- Library filenames, when compiled with MSVC (as detected by CMake's MSVC variable), are now embedded with an ABI tag string, e.g.
bsoncxx-v_noabi-rhs-x64-v142-md.lib
.- This new behavior is enabled by default; disable by setting
ENABLE_ABI_TAG_IN_LIBRARY_FILENAMES=OFF
when configuring the CXX Driver. - The ABI tag string can also be embedded in pkg-config metadata filenames, e.g.
libbsoncxx-v_noabi-rhs-x64-v142-md.pc
. This is disabled by default; enable by settingENABLE_ABI_TAG_IN_PKGCONFIG_FILENAMES=ON
(requiresENABLE_ABI_TAG_IN_LIBRARY_FILENAMES=ON
).
- This new behavior is enabled by default; disable by setting
- Deprecated CMake package config files.
find_package(libbsoncxx)
andfind_package(libmongocxx)
are no longer supported. Usefind_package(bsoncxx)
andfind_package(mongocxx)
instead.- Accordingly,
LIBBSONCXX_*
andLIBMONGOCXX_*
CMake variables provided by the legacy CMake package config files are no longer supported. Use themongo::bsoncxx_*
andmongo::mongocxx_*
CMake targets instead. - Note: manually setting compile definitions, include directories, and link libraries is unnecessary with target-based CMake. The former
LIBBSONCXX_*
andLIBMONGOCXX_*
CMake variables are superseded by thetarget_link_libraries()
CMake command, which automatically propagates the necessary compile definitions, include directories, and link libraries to dependent targets viamongo::bsoncxx_*
andmongo::mongocxx_*
interface properties.
- Experimental C++ standard library as a polyfill option via
BSONCXX_POLY_USE_STD_EXPERIMENTAL
.
- The C++ driver container image is now available on Docker hub.
- Document availability of on vcpkg and Conan.
- Add CMake option
MONGOCXX_OVERRIDE_DEFAULT_INSTALL_PREFIX
(default isTRUE
for backwards-compatibility). If enabled,CMAKE_INSTALL_PREFIX
defaults to the build directory. - Add API to manage Atlas Search Indexes.
- Automatically download C driver dependency if not provided.
- Add VERSIONINFO resource to bsoncxx.dll and mongocxx.dll.
- Do not build tests as part of
all
target. Configure withBUILD_TESTING=ON
to build tests. - Bump minimum required CMake version to 3.15 to support the FetchContent module and for consistency with the C Driver.
- Improve handling of downloaded (non-system) mnmlstc/core as the polyfill library.
- Use
FetchContent
instead ofExternalProject
to download and build the library. - Do not patch include directives in mnmlstc/core headers.
- Use
- Bump minimum C Driver version to 1.25.0.
- Explicitly document that throwing an exception from an APM callback is undefined behavior.
- Do not prematurely install mnmlstc/core headers during the CMake build step.
- Require a C Driver CMake package is found via
find_dependency()
for all installed CXX Driver package configurations.
- Remove support for exported targets from the CMake project build tree.
- Drop support for the following operating systems:
- macOS 10.14 and 10.15
- Ubuntu 14.04