BDE 3.66.0: Production Release

Schedule

  • The BDE team is pleased to announce that the BDE 3.66.0 production release was completed on Monday, Nov 02, 2020.

BDE 3.66.0 Highlights

Conversions between bsls::TimeInterval and chrono::duration

This release introduces conversions between bsls::TimeInterval and chrono::duration (work that is part of the BDE 4.0 effort).

Note that bsl::chrono::duration is a type alias to std::chrono::duration and is available only on platforms supporting C++11 (or newer) compilers. The conversions are similarly only provided on C++11 (or newer) compilers and work for both std::chrono::duration and bsl::chrono::duration types.

The following table describes permitted conversions from chrono::duration to bsls::TimeInterval:

Conversion Type

chrono::duration<rep, period> source type

implicit

duration::rep is an integral type and duration::period guarantees loss-less conversion

explicit

duration::rep is an integral type and converting from duration::period maybe be lossy (e.g., duration::period is smaller than a nanosecond)

none

duration::rep is not an integral type. Use duration_cast [1]

Note that the implicit conversions are intended allow the following code to compile:

bsls::TimeInterval oneMinuteFromNow() {
   return bsls::SystemTime::now() + 1min;  // implicit conversion from chrono::duration::minutes(1)
}

In all cases, the behavior is undefined if the chrono::duration being converted is outside of the representable range of bsls::TimeInterval (see bsls::TimeInterval::isValid).

The bsls::TimeInterval also provides a named conversion operator, asDuration<DURATION_TYPE>, to convert a bsls::TimeInterval to a chrono::duration. For example:

bsl::chrono::nanoseconds ns = myTimeInterval.asDuration<bsl::chrono::nanoseconds>();

Again, the behavior is undefined if the TimeInterval is outside of the representable range of DURATION_TYPE.

[1]: Conversions where duration::rep is a floating point representation have deliberately not been provided because such conversions will introduce subtle inaccuracies if the floating point value does not have an exact integral representation. Users must deliberately use duration_cast to perform potentially inaccurate conversions.

sim_cpp11_features.pl updated - separate files now generated

The sim_cpp11_features.pl program, which is used to provide some support for variadic templates in C++03 environments, has been updated.

Now, instead of generating the C++03 expansions “in-place” in the current file (e.g., bslstl_vector.h), they are instead generated in new _cpp03 helper file (e.g., bslstl_vector_cpp03.h). This makes reading and reviewing changes to source files much simpler, since the large diffs to generated expansions are relegated to generated files that can be ignored.

To apply sim_cpp11_features.pl to a component, a subordinate component with _cpp03 extension must be added to the package .mem membership file (e.g. adding bslsl_vector_cpp03 to the bslstl.mem file). Support for _cpp03 pseudo-components has been added to cmake_build.py, which will now re-run the sim_cpp11_features.pl program if the files are out of sync.

Fixed requests: 3.66.0

Summary

Emplacing non-CopyConstructible object in bsl::unordered_map fails to compile

bsls::TimeInterval should support standard chrono literals

STRI: bdlbb::Blob should not allow appends to overflow INT_MAX

cmake_build.py installs to the wrong lib directory on macOS

Reprocess all BDE files using sim_cpp11_features.pl

Integrate enhanced sim_cpp11_features.pl script into builds procedures

Code review changes for bslma::ConstructionUtil::make

bdef_bind.h -Wdeprecated-anon-enum-enum-conversion in std=c++2a

bsl::pair missing ctor template for types that satisfy std::is_constructible<T,U>

sim_cpp11_features.pl sometimes duplicates copyright in base file

implement bslh_fibonaccibadhashwrapper

bdlcc, bdlmt, bslmt: please clean-up doc/imp for SystemTime/CurrentTime

UBSAN failing for StringRef

Remove use of common::sense from sim_cpp11_features.pl

Release BDE 3.66.0