-
Notifications
You must be signed in to change notification settings - Fork 319
BDE 3.2 Release Notes
The BDE team is pleased to announce that the BDE Release 3.2.0 was completed on Wednesday, Nov 15, 2017
This release represents a significant step forward in the support of C++11 library features (see C++ enhancements).
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.
All bsl
containers now correctly respect the allocator propagation traits of any standard-conforming (template parameter) allocator. This feature is provided for standard-conformance.
The bsl::shared_ptr
class template now has a constructor that accepts bsl::unique_ptr
.
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
.
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
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
The bdlcc_cache
component provides a fully thread-safe, in-process cache with a configurable eviction policy (e.g., least recently used).
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 a
bsl::dequebut not a
bdlcc:Deque(e.g.,
bsl::sort,
bsl::remove_if`).
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.