C++11 support

21 views
Skip to first unread message

Orion Poplawski

unread,
Feb 1, 2025, 12:30:28 PMFeb 1
to icu-support
Is it intentional that ICU76 dropped support for C++11?  I'm seeing the following build error in kbibtex which uses C++11:

cd /builddir/build/BUILD/kbibtex-0.10.0-build/kbibtex-0.10.0/redhat-linux-build/src/io && /usr/bin/g++ -DHAVE_ICU -DHAVE_KF5 -DHAVE_QTWIDGETS -DHAVE_SCIHUB -DHAVE_WEBENGINEWIDGETS -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_XMLPATTERNS_LIB -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -Dkbibtexio_EXPORTS -I/builddir/build/BUILD/kbibtex-0.10.0-build/kbibtex-0.10.0/redhat-linux-build/src/io -I/builddir/build/BUILD/kbibtex-0.10.0-build/kbibtex-0.10.0/src/io -I/builddir/build/BUILD/kbibtex-0.10.0-build/kbibtex-0.10.0/redhat-linux-build/src/io/kbibtexio_autogen/include -I/builddir/build/BUILD/kbibtex-0.10.0-build/kbibtex-0.10.0/redhat-linux-build/src/data -I/builddir/build/BUILD/kbibtex-0.10.0-build/kbibtex-0.10.0/src/data -I/builddir/build/BUILD/kbibtex-0.10.0-build/kbibtex-0.10.0/redhat-linux-build/src/config -I/builddir/build/BUILD/kbibtex-0.10.0-build/kbibtex-0.10.0/src/config -I/builddir/build/BUILD/kbibtex-0.10.0-build/kbibtex-0.10.0/src/global -I/builddir/build/BUILD/kbibtex-0.10.0-build/kbibtex-0.10.0/redhat-linux-build/src/global -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtCore -isystem /usr/lib64/qt5/mkspecs/linux-g++ -isystem /usr/include/qt5/QtGui -isystem /usr/include/poppler/qt5 -isystem /usr/include/qt5/QtConcurrent -isystem /usr/include/qt5/QtXmlPatterns -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/KF5/KI18n -isystem /usr/include/KF5 -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fno-exceptions -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type -Werror=init-self -Wvla -Wdate-time -Wsuggest-override -Wlogical-op -DNDEBUG -std=gnu++11 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fPIC -MD -MT src/io/CMakeFiles/kbibtexio.dir/encoder.cpp.o -MF CMakeFiles/kbibtexio.dir/encoder.cpp.o.d -o CMakeFiles/kbibtexio.dir/encoder.cpp.o -c /builddir/build/BUILD/kbibtex-0.10.0-build/kbibtex-0.10.0/src/io/encoder.cpp

In file included from /usr/include/unicode/unistr.h:37,
                 from /usr/include/unicode/translit.h:27,
                 from /builddir/build/BUILD/kbibtex-0.10.0-build/kbibtex-0.10.0/src/io/encoder.cpp:21:
/usr/include/unicode/char16ptr.h:271:38: error: ‘enable_if_t’ in namespace ‘std’ does not name a template type
  271 | template<typename T, typename = std::enable_if_t<std::is_same_v<T, UChar>>>
      |                                      ^~~~~~~~~~~
/usr/include/unicode/char16ptr.h:271:33: note: ‘std::enable_if_t’ is only available from C++14 onwards
  271 | template<typename T, typename = std::enable_if_t<std::is_same_v<T, UChar>>>
      |                                 ^~~
/usr/include/unicode/char16ptr.h:271:49: error: expected ‘>’ before ‘<’ token
  271 | template<typename T, typename = std::enable_if_t<std::is_same_v<T, UChar>>>
      |                                                 ^
/usr/include/unicode/char16ptr.h: In function ‘const char16_t* icu_76::uprv_char16PtrFromUChar(const T*)’:
/usr/include/unicode/char16ptr.h:273:24: error: ‘is_same_v’ is not a member of ‘std’; did you mean ‘is_same’? [-Wtemplate-body]
  273 |     if constexpr (std::is_same_v<UChar, char16_t>) {
      |                        ^~~~~~~~~
      |                        is_same

Markus Scherer

unread,
Feb 1, 2025, 1:12:52 PMFeb 1
to Orion Poplawski, icu-support
On Sat, Feb 1, 2025 at 9:30 AM Orion Poplawski <or...@nwra.com> wrote:
Is it intentional that ICU76 dropped support for C++11?

ICU 75 did.
... C++ code now requires C++17 (C code now requires C11) ...

The download page also says:
ICU4C requires C++17 and has been tested with up to C++20.

markus
Reply all
Reply to author
Forward
0 new messages