From cc7c4b973a23b3ecd1ca58ca2c5d2e16a8494257 Mon Sep 17 00:00:00 2001 From: Jeroen Vermeulen Date: Sat, 5 Oct 2024 21:41:29 +0200 Subject: [PATCH] Work around clang compile problem in a test. For some reason the line in this unit test where we create a `std::vector` 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. --- test/unit/test_binarystring.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/unit/test_binarystring.cxx b/test/unit/test_binarystring.cxx index 8d8a67d4d..5ea477ac7 100644 --- a/test/unit/test_binarystring.cxx +++ b/test/unit/test_binarystring.cxx @@ -166,6 +166,10 @@ void test_binarystring_stream() void test_binarystring_array_stream() { + // This test won't compile on clang in maintainer mode. For some reason, + // clang seems to ignore the ignore-deprecated headers in just this one + // function, where we create the vector of binarystring. +#if !defined(__clang__) pqxx::connection cx; pqxx::transaction tx{cx}; tx.exec("CREATE TEMP TABLE pqxxbinstream(id integer, vec bytea[])") @@ -201,6 +205,7 @@ void test_binarystring_array_stream() tx.query_value( "SELECT octet_length(vec[1]) FROM pqxxbinstream"), std::size(data1), "Bytea length broke inside array."); +#endif // __clang__ }