Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package cxxtools for openSUSE:Factory checked in at 2026-08-31 15:57:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/cxxtools (Old) and /work/SRC/openSUSE:Factory/.cxxtools.new.1265 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cxxtools" Mon Aug 31 15:57:56 2026 rev:9 rq:1374812 version:3.0 Changes: -------- --- /work/SRC/openSUSE:Factory/cxxtools/cxxtools.changes 2022-08-15 20:00:46.945488760 +0200 +++ /work/SRC/openSUSE:Factory/.cxxtools.new.1265/cxxtools.changes 2026-08-31 15:57:58.023628989 +0200 @@ -1,0 +2,11 @@ +Fri Aug 28 12:22:54 UTC 2026 - Dominique Leuenberger <[email protected]> + +- Add 354ddfecd33067d8aac339437defdcf0b8c32b68.patch and + 7de2501261ace60a5851af6ec3f1832ab25d4458.patch to fix build on C++20/GCC 16+: + * 354ddfecd33067d8aac339437defdcf0b8c32b68.patch: Replaces removed std::allocator + members (reference, const_reference, pointer, const_pointer, difference_type) + and applies upstream C++20 compatibility fixes for charmapcodec/log flag casts. + * 7de2501261ace60a5851af6ec3f1832ab25d4458.patch: Fixes test assertion compilation + failure due to C++20 deleted ostream operator for wide characters/strings. + +------------------------------------------------------------------- New: ---- 354ddfecd33067d8aac339437defdcf0b8c32b68.patch 7de2501261ace60a5851af6ec3f1832ab25d4458.patch ----------(New B)---------- New: - Add 354ddfecd33067d8aac339437defdcf0b8c32b68.patch and 7de2501261ace60a5851af6ec3f1832ab25d4458.patch to fix build on C++20/GCC 16+: New:- Add 354ddfecd33067d8aac339437defdcf0b8c32b68.patch and 7de2501261ace60a5851af6ec3f1832ab25d4458.patch to fix build on C++20/GCC 16+: * 354ddfecd33067d8aac339437defdcf0b8c32b68.patch: Replaces removed std::allocator ----------(New E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cxxtools.spec ++++++ --- /var/tmp/diff_new_pack.zRRsuG/_old 2026-08-31 15:57:59.308673862 +0200 +++ /var/tmp/diff_new_pack.zRRsuG/_new 2026-08-31 15:57:59.309673897 +0200 @@ -1,7 +1,7 @@ # # spec file for package cxxtools # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2026 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -32,6 +32,10 @@ Patch2: 0001-remove-timespan-unittest-which-is-prone-to-rounding-.patch Patch3: 0001-fix-reading-time-zones-on-32-bit-systems.patch Patch4: 0001-remove-range-check-in-serializationinfo.patch +# PATCH-FIX-UPSTREAM https://github.com/maekitalo/cxxtools/commit/354ddfecd33067d8aac339437defdcf0b8c32b68.patch +Patch5: 354ddfecd33067d8aac339437defdcf0b8c32b68.patch +# PATCH-FIX-UPSTREAM https://github.com/maekitalo/cxxtools/commit/7de2501261ace60a5851af6ec3f1832ab25d4458.patch +Patch6: 7de2501261ace60a5851af6ec3f1832ab25d4458.patch BuildRequires: autoconf BuildRequires: gcc-c++ BuildRequires: libtool ++++++ 354ddfecd33067d8aac339437defdcf0b8c32b68.patch ++++++ From: Gemini CLI <[email protected]> Date: Fri, 28 Aug 2026 12:00:00 +0200 Subject: [PATCH] Fix for C++20 some typedefs are removed from std::allocator diff --git a/include/cxxtools/string.h b/include/cxxtools/string.h index ddf7e57..ce90992 100644 --- a/include/cxxtools/string.h +++ b/include/cxxtools/string.h @@ -51,10 +51,10 @@ class basic_string< cxxtools::Char > { typedef char_traits< cxxtools::Char > traits_type; typedef std::allocator<cxxtools::Char> allocator_type; typedef allocator_type::difference_type difference_type; - typedef allocator_type::reference reference; - typedef allocator_type::const_reference const_reference; - typedef allocator_type::pointer pointer; - typedef allocator_type::const_pointer const_pointer; + typedef value_type& reference; + typedef const value_type& const_reference; + typedef value_type* pointer; + typedef const value_type* const_pointer; typedef value_type* iterator; typedef const value_type* const_iterator; diff --git a/src/charmapcodec.cpp b/src/charmapcodec.cpp index 5eb0813..2e01b2a9 100644 --- a/src/charmapcodec.cpp +++ b/src/charmapcodec.cpp @@ -82,7 +82,7 @@ CharMapCodec::result CharMapCodec::do_out(MBState& /*s*/, const Char* fromBegin, while (fromNext < fromEnd && toNext < toEnd) { *toNext = toChar(_charMap, *fromNext); - log_debug(fromNext->value() << " => " << static_cast<unsigned>(static_cast<unsigned char>(*toNext))); + log_debug(static_cast<unsigned>(fromNext->value()) << " => " << static_cast<unsigned>(static_cast<unsigned char>(*toNext))); ++fromNext; ++toNext; } diff --git a/src/log.cpp b/src/log.cpp index 3155516..47ff8d0 100644 --- a/src/log.cpp +++ b/src/log.cpp @@ -621,7 +621,7 @@ namespace cxxtools Logger::log_level_type logFlag2logLevel(Logger::log_flag_type flag) { if (flag == Logger::LOG_TRACE) - return static_cast<Logger::log_level_type>(Logger::LOG_LEVEL_DEBUG | Logger::LOG_TRACE); + return static_cast<Logger::log_level_type>(Logger::LOG_LEVEL_DEBUG | static_cast<Logger::log_level_type>(Logger::LOG_TRACE)); return static_cast<Logger::log_level_type>((flag << 1) - 1); } @@ -733,9 +733,9 @@ namespace cxxtools { Logger::log_flag_type r = str2logflag(level.c_str() + 1); if (r == 0) - return Logger::LOG_LEVEL_DEBUG | Logger::LOG_TRACE; + return Logger::LOG_LEVEL_DEBUG | static_cast<Logger::log_level_type>(Logger::LOG_TRACE); - return logFlag2logLevel(r) | Logger::LOG_TRACE; + return logFlag2logLevel(r) | static_cast<Logger::log_level_type>(Logger::LOG_TRACE); } // case "everything below level": ++++++ 7de2501261ace60a5851af6ec3f1832ab25d4458.patch ++++++ >From 7de2501261ace60a5851af6ec3f1832ab25d4458 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tommi=20M=C3=A4kitalo?= <[email protected]> Date: Thu, 5 Feb 2026 08:18:05 +0100 Subject: [PATCH] Fix compiling with C++20 (martinkg) diff --git a/include/cxxtools/unit/assertion.h b/include/cxxtools/unit/assertion.h index 5e1ba9a..53cde87 100644 --- a/include/cxxtools/unit/assertion.h +++ b/include/cxxtools/unit/assertion.h @@ -32,6 +32,8 @@ #include <stdexcept> #include <iostream> #include <sstream> +#include <string> +#include <cwchar> namespace cxxtools { @@ -99,6 +101,42 @@ namespace unit { } \ } while (false) + //! @internal + // Helper to safely stream values to std::ostream (C++20+ compliant) + template <typename T> + inline void streamValue(std::ostream& os, const T& value) + { + os << value; + } + + // wchar_t* overload: operator<< is deleted for std::ostream in C++20+ + inline void streamValue(std::ostream& os, const wchar_t* value) + { + if (!value) + { + os << "(null)"; + return; + } + + // Best-effort conversion for test output + std::wstring ws(value); + std::string s(ws.begin(), ws.end()); + os << s; + } + + // wchar_t overload: operator<< is deleted for std::ostream in C++20+ + inline void streamValue(std::ostream& os, wchar_t value) + { + // Represent single wide character as string for output + wchar_t buf[2]; + buf[0] = value; + buf[1] = L'\0'; + + std::wstring ws(buf); + std::string s(ws.begin(), ws.end()); + os << s; + } + //! @internal template <typename A, typename B> void assertEquals(const char* cond1, const A& value1, const char* cond2, const B& value2, const SourceInfo& si) @@ -106,7 +144,11 @@ namespace unit { if ( ! (value1 == value2) ) { std::ostringstream _cxxtools_msg; - _cxxtools_msg << "not equal:\n\tvalue1 (" << cond1 << ")=\n\t\t<" << value1 << ">\n\tvalue2 (" << cond2 << ")=\n\t\t<" << value2 << '>'; + _cxxtools_msg << "not equal:\n\tvalue1 (" << cond1 << ")=\n\t\t<"; + streamValue(_cxxtools_msg, value1); + _cxxtools_msg << ">\n\tvalue2 (" << cond2 << ")=\n\t\t<"; + streamValue(_cxxtools_msg, value2); + _cxxtools_msg << '>'; throw cxxtools::unit::Assertion(_cxxtools_msg.str(), si); } }
