Skip to content

Conversation

@arekm
Copy link

@arekm arekm commented Jul 11, 2025

Fixes building with libicu 76 which relies on standard 17.

(libicu 76.1 is part of upcoming Debian Trixie)

With 11:

[ 39%] Building CXX object src/lib/CMakeFiles/digiham_util.dir/charset.cpp.o
cd /home/sdr/test/owrx-build/aarch64/digiham/obj-aarch64-linux-gnu/src/lib && /usr/bin/c++ -DVERSION="0.6.2" -I/home/sdr/test/owrx-build/aarch64/digiham/include -I/home/sdr/test/owrx-build/aarch64/digiham/src/lib -g -O2 -ffile-prefix-map=/home/sdr/test/owrx-build/aarch64/digiham=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -Wdate-time -D_FORTIFY_SOURCE=2 -std=gnu++11 -fPIC -MD -MT src/lib/CMakeFiles/digiham_util.dir/charset.cpp.o -MF CMakeFiles/digiham_util.dir/charset.cpp.o.d -o CMakeFiles/digiham_util.dir/charset.cpp.o -c /home/sdr/test/owrx-build/aarch64/digiham/src/lib/charset.cpp
In file included from /usr/include/unicode/uenum.h:25,
from /usr/include/unicode/ucnv.h:52,
from /home/sdr/test/owrx-build/aarch64/digiham/src/lib/charset.cpp:3:
/usr/include/unicode/localpointer.h:561:26: error: parameter declared ‘auto’
561 | template <typename Type, auto closeFunction>
| ^~~~
/usr/include/unicode/localpointer.h:573:76: error: template argument 2 is invalid
573 | explicit LocalOpenPointer(std::unique_ptr<Type, decltype(closeFunction)> &&p)
| ^
/usr/include/unicode/localpointer.h:583:78: error: template argument 2 is invalid
583 | LocalOpenPointer &operator=(std::unique_ptr<Type, decltype(closeFunction)> &&p) {
| ^
/usr/include/unicode/localpointer.h:599:59: error: template argument 2 is invalid
599 | operator std::unique_ptr<Type, decltype(closeFunction)> () && {
| ^

Fixes building with libicu 76 which relies on standard 17.
@jketterl
Copy link
Owner

Thank you for the pull request.

I am a bit concerned about the backwards compatibility... Do you happen to know how far back this would still work in terms of Debian releases? I'd like the code to be able to compile on stable, so ideally this should still work on bullseye.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants