Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
894: Fix error-reporting crash in non-blocking connection. (#895)
* 894: Fix error-reporting crash in non-blocking connection. Fixes: #894 If construction of a non-blocking `connection` failed for a reason _other_ than an out-of-memory error, then reporting of the error would fail. This happened because the error-reporting code tried to read the error message _after it had already cleared the connection pointer._ This means reading deallocated memory. * Drop obsolete option in CircleCI build. * Fix `assume()` chneck for clang C++17/C++20 build. In clang 19, all of a sudden the compile-time feature check for `[[assume()]]` support started issuing a warning: it says that attribute is a "C++23 extension." And the maintainer-mode build treats warnings as wrrors, so... Kaboom. The problem is that in this mode, clang 19 does define the feature test macro for this attribute even in C++ 17, but when you actually _use_ the attribute, clang warns (at least with strict checking options) that it is not part of C++17 (or C++20, as the case may be). To get around that, I wrote a more substantial feature check and ran it at _configure_ time. This is where my work on systematising the feature check mechanism really pays off — a few years ago this would have been a fairly substantial change, with lots of opportunities to do it wrong. * Work around clang compile problem in a test. For some reason the line in this unit test where we create a `std::vector<pqxx::binarystring>` triggers a deprecation warning, even though the line is bracketed in an "ignore deprecations" block. Since the whole class is deprecated, it wasn't really worth fixing properly. I'll just stop building this test on clang, until the time comes to drop the whole class and its tests anyway. Which I hope is not too far off.
- Loading branch information