BDE 3.118.0 Release

Schedule

  • The BDE team announces that the BDE 3.118.0 production release was completed on Monday, May 15, 2023.

BDE 3.118.0 Highlights

C++20 Library Features

For compilers that support the 3-way comparison operator <=>, added support for the following types:

  • bsl::basic_string

  • bsl::multimap

  • bsl::multiset

  • bsl::set

Added the header <bsl_concepts.h>, which provides the following aliases for C++20 concepts if they are defined in the standard library:

  • bsl::same_as

  • bsl::derived_from

  • bsl::convertible_to

  • bsl::common_reference_with

  • bsl::common_with

  • bsl::integral

  • bsl::signed_integral

  • bsl::unsigned_integral

  • bsl::floating_point

  • bsl::assignable_from

  • bsl::swappable

  • bsl::swappable_with

  • bsl::destructible

  • bsl::constructible_from

  • bsl::default_initializable

  • bsl::move_constructible

  • bsl::copy_constructible

Added the bsl::erase and bsl::erase_if free functions to <bsl_string.h>.

Planned Enhancements to double Parsing Facilities

Parsing ASCII representations of floating point numbers into their (closest) binary approximation is a complex and fundamental operation for many financial applications. The article Binary to Decimal and Back Again elaborates on the difficulties in converting between an ASCII (base-10) floating point representation and a binary floating point representations like double.

The BDE libraries provide a function bdlb::NumericParseUtil::parseDouble, which underlies the interpretation of ASCII floating point numbers for many applications (most notably for the JSON and XML parsers). parseDouble delegates most of its behavior for the C standard library function strtod, but attempts to provide a simpler interface and address some consistency issues with the implementations of strtod on various platforms.

BDE 3.118.0 release contains key parts of a planned set of enhancements to bdlb::NumericParserUtil::parseDouble.

The planned changes are:

  • Where possible, bdlb::NumericParserUtil::parseDouble will be implemented in terms of the C++17 standard library function from_chars (instead of strtod). Modern compilers implement or are in the process of implementing variants of the fast_float algorithm, which provides significantly faster parsing for floating point numbers.

  • Improve the handling of underflow and overflow values. Underflow (numbers close enough to 0 that 0 is their closest double approximation) and overflow (values beyond the representable range for double) input will continue to return 0 and +/-INF respectively, but will report a new status code to indicate that the conversion underflowed or overflowed.

  • De-support parsing the hexadecimal floating point representations. This format is not supported on Solaris, and invalid for key use-cases for parseDouble (hex-double is not a valid number format in document representations like JSON and XML).

The last two points are not implemented in BDE 3.118.0. They are planned for a future release. BDE 3.118.0 instruments parseDouble to allow us to identify any users that will be impacted by those planned changes. Users deliberately using the hex-float format should contact the BDE team to discuss their use-case.

Bug Fix for bdldfp::Decimal128

Fixed issues related to bdldfp::Decimal128 being over-aligned on some 32-bit platforms, which had resulted in compilation errors and test driver crashes.

Documentation for Moving and Forwarding Utilities

Added a section to ‘bsls’ package documentation describing different components which can be used for argument forwarding, which of these components should be used for what purpose, and some example code.

Fixed DRQSs:

Summary

Update implementation of NumericParseUtil to use from_chars where available

Document how to forward types in templates

bbs_build_env should have sensible defaults

Ensure that BDE compiles with -DBDE_FORCE_OMIT_INTERNAL_DEPRECATED

C++20 work: Add the ‘erase’ and the ‘erase_if’ free functions to the ‘bslstl_string.h’

C++20 work: Add the ‘operator<=>’ to the ‘bslstl::basic_string’

C++20 work: Add the ‘operator<=>’ to the ‘bslstl::multimap’

C++20 work: Add the ‘operator<=>’ to the ‘bslstl::set’

C++20 work: Add the ‘operator<=>’ to the ‘bslstl::multiset’

bdldfp_decimal: segfault in TC 7

C++20 work: alias c++20 concepts

Reorganize the feature index

Fix use-after-free error in bslmt_readerwritermuteximpl.t.cpp

Fix ‘use-after-destruction’ in bdlmt_fixedthreadpool.t

Fix Use-after-destruction in bdlmt_timereventscheduler.t

Update BDE documented supported platforms

bdls::PipeUtil::isOpenForReading fails for Windows named pipes created in byte mode

bdlf_noop C++11 constexpr fix