BDE 4.16.0 Release¶
Schedule¶
The BDE team announces that the BDE 4.16.0 production release was completed on Monday, Oct 28th, 2024.
BDE 4.16.0 Release Highlights¶
New erase_if member function of bsl::multimap
and bsl::unordered_multimap
¶
Following up on earlier, similar additions to the other associated containers,
the multimap implementations in bsl
now also support erase_if
on all
platforms.
New at
member function of bsl::span
¶
The member function at
has been added to bsl::span
. This function
behaves in the same manner as vector::at
(and others). It returns a
reference to the ‘index-th’ element in the span, and throws a
std::out_of_range
exception if the index is not less than size()
.
This function will be available when compiling for C++17 and earlier, and for C++26 or later - but not for C++20 or C++23.
New contains
member functions of bsl::string
and bsl::string_view
¶
- Three overloads of
contains
have been added tobsl::string
andbsl::string_view
: bool contains(char pattern);
bool contains(string_view pattern);
bool contains(const char *pattern);
These functions return true when the pattern occurs in the string
/string_view
.
Example:
bsl::string s = "ABCDEFGHIJ";
bsl::string pat1 = "DEF";
bsl::string_view pat2 = "XYZ";
assert( s.contains('A'));
assert(!s.contains('Z'));
assert( s.contains(pat1));
assert(!s.contains(pat2));
assert( s.contains("HI"));
assert(!s.contains("QR"));
New component bdlf_overloaded
¶
The bdlf::overloaded
component has been added, a C++17 and later component
for manually building overload sets. This is quite useful when working with
variants (and things like JSON objects that are built using a variant).
An overloaded object is created from a set of invocables
, which can include
objects with an operator()
, member functions, free functions, or (most
commonly) lambda expressions. When the overloaded object is invoked, the
correct overload will be chosen by the parameter types in the call.
Here is a very simple example:
bdlf::Overloaded over{
[](unsigned) {return 1;}
, [](double) {return 2;}
, [](const bsl::string&) {return 3;}
};
assert(1 == over(3U)); // calls the first lambda
assert(2 == over(3.0)); // calls the second lambda
assert(3 == bsl::string("3")); // calls the third lambda
// A slightly more useful example:
bsl::variant<unsigned, double, bsl::string> v;
v = 3.0; // v now holds an double
assert(2 == bsl::visit(over, v)); // calls the second lambda
Fixed DRQSs:¶
Summary |
---|
Race in bdlcc::SingleConsumerQueue pops before push has written to node |
Please create a component for the overload pattern in bdlf |
Please ensure that bsl::span and string_view are trivially copyable |
Please add contains to bsl::string and bsl::string_view |
please correct older CMake configuration error |
improve situation where an event scheduled to run in the past can have a very lar… |
add WP reproducing pthread_cond lost signal reproducer into bdlmt_fixedtheadpool.… |
Implement P1115 - Improving the return value of Erase-like Algorithms II (free er… |
Add space-for-positive-sign support for bdldfp::Decimal* formatting |
please correct bdlf_overloaded test warnings |
Implement P2821: span.at() |
Fix Decimal128 crash in optimized mode on MSVC |
BSLMT_ONCE_DO produces rsat warnings in Devise Analyze |
please correct/reduce bdlmt_threadpool case 4 intermittent issue |
EventScheduler TestTimeSource.advanceTime() appears to block |
bdldfp enable both natural and specified precision in all formats in ImpUtil |
Update bsls_buildtarget doc |
Move bdeimp_Fuzzy to bdlb and modernize it |
Provide is_trivially_* aliases on Clang |