BDE 3.99.1 Release

Schedule

  • The BDE team announces that the BDE 3.99.1 production release was completed on Monday, March 15, 2022.

BDE 3.99.1 Highlights

New BSL_GET_VERSION_MAJOR/MINOR Macros

The bslscm_versiontag.h header now provides 2 new macros:

  • BSL_GET_VERSION_MAJOR(version)

  • BSL_GET_VERSION_MINOR(version)

These macros wrap the logic needed to extract the major and minor version elements from the integer returned from the BSL_MAKE_VERSION(major, minor) macro .

Once downstream code uses the new macros rather than arithmetic to extract version components, the BDE team will be able to change the format `BSL_MAKE_VERSION` outputs in order to allow us to go to version `3.100.0` in the near future.

Here’s what a sample downstream fix would look like:

     // checking version consistency
-    int major = (SOMEPKG_VERSION / 10000) % 100;
-    int minor = (SOMEPKG_VERSION / 100) % 100;
+    int major =  BSL_GET_VERSION_MAJOR(SOMEPKG_VERSION);
+    int minor =  BSL_GET_VERSION_MINOR(SOMEPKG_VERSION);

     EXPECT_EQ(SOMEPKG_VERSION_MAJOR, major);
     EXPECT_EQ(SOMEPKG_VERSION_MINOR, minor);

bdlb::ScopeExit Enhancements

This release adds deduction guides for code targeting C++17 or later.

This release also introduces the cross-platform macros BDLB_SCOPEEXIT_GUARD and BDLB_SCOPEEXIT_PROCTOR for creating scope exit guard variables without the need to specify the exit function type or use bdlb::ScopeExitAny. bdlb::ScopeExitAny serves a similar purpose to those macros, and provides more conventional syntax, but some users may prefer the new macros because in C++03 (AIX, SunOS), the exit function type will be erased via bsl::function by bdlb::ScopeExitAny, potentially adding run time overhead. For users that do not need to support older language standards we recommend not using either the new macros or bdlb::ScopeExitAny, as they can now take advantage of class template argument deduction to avoid explicitly specifying the exit function type.

bsl::unordered_set, bsl::unordered_multiset, bsl::unordered_map, bsl::unordered_multimap Now Provide Deduction Guides

This release adds deduction guides for bsl::unordered_set, bsl::unordered_multiset, bsl::unordered_map, and bsl::unordered_multimap allowing clients using C++17 to forgo supplying explicit template arguments when creating one of these types.

For example:

bsl::unordered_map<bsl::string, int> original;

// without C++17 or deduction guides
bsl::unordered_map<bsl::string, int> complicatedCopy(original);

// with C++17 and deduction guides
bsl::unordered_map simplerCopy(original);

Note that C++17 supports automatic template argument deduction in many contexts, however some types require explicit deduction guides in order for the compiler to deduce the template arguments. There is ongoing work to provide similar guides for all the standard library types in bsl that require them.

Fixed requests: 3.99.1

Summary

bdlat_EnumeratorInfo constexpr support for member functions

Fuzz DateUtil::lastDayInMonth(int year, int month);

Improve documentation regarding thread-safety of VALUE in bdlcc_cache

bslstl_optional is inadequately tested

Please add array and nullable utility components to ‘bdlat’

Apply strict BDE rules & terminology to bdlb::ScopeExit external changes

Add class template deduction guides to bsl::unordered_set and unordered_multiset

Update class template deduction guides with new info that I’ve learned

Add class template deduction guides to bsl::unordered_map and unordered_multimap

bdls_filesystemutil bad string_view usage

Add nodiscard annotation that works for types BSLA_NODISCARD_CPP17

Add tests for implicit CTAD guides for bsl::default_searcher and others

balb_pipecontrolchannel race condition blocks indefinitely

Add C++17 type aliases to bsl_type_traits.h

correct minor tsan issues in some bdlcc queues test drivers

Release BDE 3.99.1

Correctly handle versions of the form x.yyy.zz

Replace BOOL as template arg in bsl_type_traits.h

Use version 3.99.1 instead of 3.100.0 for next BDE release