Skip to content

BDE 3.2 Release Notes

Oleg Subbotin edited this page Nov 22, 2017 · 3 revisions

BDE 3.2 Release Notes

Schedule

The BDE team is pleased to announce that the BDE Release 3.2.0 was completed on Wednesday, Nov 15, 2017

BDE 3.2 Highlights

This release represents a significant step forward in the support of C++11 library features (see C++ enhancements).

C++ Enhancements

bsl Provides all C++11 Standard Library Interfaces

Our implementation of the standard library (the bsl namespace) now includes all C++11 interfaces. However, support for many features requires support from the underlying native standard library on your platform.

Interfaces that are not supported on all of our build platforms are conditionally visible according to the suite of preprocessor macros provided by the bsls_libraryfeatures component. Typically, each of those macro flags represents one or more library features: e.g., BSLS_LIBRARYFEATURES_HAS_CPP11_TUPLE, BSLS_LIBRARYFEATURES_HAS_CPP11_PAIR_PIECEWISE_CONSTRUCTOR. The macros have been evaluated for the libraries (platforms, versions) that are generally used in the Bloomberg build environment.

Support for Standard Allocator Propagation Traits

All bsl containers now correctly respect the allocator propagation traits of any standard-conforming (template parameter) allocator. This feature is provided for standard-conformance.

bsl::shared_ptr Constructible from bsl::unique_ptr

The bsl::shared_ptr class template now has a constructor that accepts bsl::unique_ptr.

Move Semantics Added

Move semantics (constructors, assignment) have been added to several classes:

  • bdlb::NullableValue
  • bdlb::Variant
  • bslma::ManagedPtr

On pre-C++11 platforms, move semantics are emulated using bslmf::MovableRef.

Small Object Optimization

Objects smaller than the size of a pointer (platform dependent) are now assumed to be bit-wise movable. In the vast majority of cases, this is a silent optimization.

This optimization will break code that depends on the validity of pointers (or other references) to such small objects. If you have such dependencies, you must now explicitly specify such types as non-movable. For example, insert below the definition of your (tiny) type the template specialization:

namespace BloombergLP {
namespace bslmf {
    template <> struct IsBitwiseMoveable<MyTinyClass> : bsl::false_type {};
}  // close package namespace
}  // close enterprise namespace

New Packages

bdlsta

The new bdlsta package provides basic statistical computations. Currently, the package is populated with two components:

  • bdlsta_moment for calculating mean, variance, skew, and kurtosis online
  • bdlsta_linefit for calculating linear squares line fit online

New Components

bdlcc_cache

The bdlcc_cache component provides a fully thread-safe, in-process cache with a configurable eviction policy (e.g., least recently used).

bdlcc_deque

The new bdlcc::Deque class template provides a fully thread-safe double-ended queue (container) based on bsl::deque and is recommended as a non-interface compatible alternative for the existing bdlcc::Queue.

The thread-safety nature of this class requires different usage patterns compared to bsl::deque and the class has been enhanced accordingly. The manipulator methods (i.e., 'push' and 'pop') are provided in blocking, non-blocking (i.e., 'try'), and timed variants. Push methods block when the size of the queue is at an (advisory) high-water mark. There are also 'push' variants that will force the container past the high-water mark.

Additionally, one can construct a bdlcc::Deque::Proctor (or bdlcc::Deque::ConstProctor) object from a bdlcc::Deque object, gain exclusive locked access to its underlying bsl::deque, and then thread-safely access that object. This feature is useful if one wishes to use methods that are not provided directly by bdlcc::Deque(e.g., operator[], front) or use algorithm functions that can be applied to absl::dequebut not abdlcc:Deque(e.g.,bsl::sort, bsl::remove_if`).

bslmt_readerwritermutex

This new component provides the bslmt::ReaderWriterMutex class, a mechanism providing multi-reader/single-writer synchronization to a shared resource. The bslmt::ReaderWriterMutex implementation is not reader-biased whereas the existing bslmt::RWMutex class, now DEPRECATED, could starve writers in favor of readers.