https://bugs.kde.org/show_bug.cgi?id=439780
Bug ID: 439780 Summary: kio does not compile with libc++ due to the use of the (obsolete and removed) std::mem_fun Product: frameworks-kio Version: 5.84.0 Platform: Gentoo Packages OS: Linux Status: REPORTED Severity: major Priority: NOR Component: general Assignee: kio-bugs-n...@kde.org Reporter: sputn...@quassel-irc.org CC: kdelibs-b...@kde.org Target Milestone: --- SUMMARY Kio 5.84.0 does not compile with libc++, causing the following error: --------------------------------- FAILED: src/widgets/CMakeFiles/KF5KIOWidgets.dir/kpropertiesdialog.cpp.o /usr/lib/ccache/bin/clang++ -DKCOMPLETION_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054100 -DKCOREADDONS_LIB -DKF5KIOWidgets_EXPORTS -DKF_DEPRECATED_WARNINGS_SINCE=0x060000 -DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x055100 -DKGUIADDONS_LIB -DKIOCORE_DEPRECATED_ WARNINGS_SINCE=0x0 -DKIOCORE_DISABLE_DEPRECATED_BEFORE_AND_AT=0x0 -DKIOWIDGETS_DEPRECATED_WARNINGS_SINCE=0x0 -DKIOWIDGETS_DISABLE_DEPRECATED_BEFORE_AND_AT=0x0 -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_DISABLE_DEPRECATED_BEFORE=0x050f00 -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_FOREACH -DQT_NO_KEYWORDS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_URL_CAST_FROM_STRING -DQT_STRICT_ITERATORS -DQT_USE_QSTRINGBUILDER -DQT_WIDGETS_LIB -DQT_XML_LIB -DTRANSLATION_DOMAIN=\"kio5\" -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -Isrc/widgets -I/var/tmp/portage/kde-frameworks/kio-5.84.0/work/kio-5.84.0/src/widgets -Isrc/widgets/KF5KIOWidgets_autogen/include -Isrc/gui -I/var/tmp/portage/kde-frameworks/kio-5.84.0/work/kio-5.84.0/src/gui -Isrc/core/.. -I/var/tmp/portage/kde-frameworks/kio-5.84.0/work/kio-5.84.0/src/core/kssl -Isrc/core -I/var/tmp/portage/kde-frameworks/kio-5.84.0/work/kio-5.84.0/src/core -isystem /usr/include/KF5/KCoreAddons -isystem /usr/include/KF5 -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtCore -isystem /usr/lib64/qt5/mkspecs/linux-clang -isystem /usr/include/KF5/KService -isystem /usr/include/KF5/KConfigCore -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtDBus -isystem /usr/include/KF5/KWindowSystem -isystem /usr/include/qt5/QtGui -isystem /usr/include/KF5/KJobWidgets -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/KF5/Solid -isystem /usr/include/KF5/KCompletion -isystem /usr/include/KF5/KWidgetsAddons -isystem /usr/include/qt5/QtConcurrent -isystem /usr/include/KF5/KI18n -isystem /usr/include/KF5/KGuiAddons -isystem /usr/include/KF5/KIconThemes -isystem /usr/include/KF5/KConfigWidgets -isystem /usr/include/KF5/KCodecs -isystem /usr/include/KF5/KConfigGui -isystem /usr/include/qt5/QtXml -isystem /usr/include/KF5/KAuth -DQT_NO_DEBUG -O3 -march=native -pipe -fomit-frame-pointer -fno-operator-names -fno-exceptions -Wno-gnu-zero-variadic-macro-arguments -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type -Wvla -Wdate-time -fdiagnostics-color=always -pedantic -Wzero-as-null-pointer-constant -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fPIC -std=c++17 -MD -MT src/widgets/CMakeFiles/KF5KIOWidgets.dir/kpropertiesdialog.cpp.o -MF src/widgets/CMakeFiles/KF5KIOWidgets.dir/kpropertiesdialog.cpp.o.d -o src/widgets/CMakeFiles/KF5KIOWidgets.dir/kpropertiesdialog.cpp.o -c /var/tmp/portage/kde-frameworks/kio-5.84.0/work/kio-5.84.0/src/widgets/kpropertiesdialog.cpp /var/tmp/portage/kde-frameworks/kio-5.84.0/work/kio-5.84.0/src/widgets/kpropertiesdialog.cpp:2275:74: error: no member named 'mem_fun' in namespace 'std'; did you mean 'mem_fn'? std::for_each(theNotSpecials.begin(), theNotSpecials.end(), std::mem_fun(&QWidget::hide)); ~~~~~^~~~~~~ mem_fn /usr/include/c++/v1/functional:1410:1: note: 'mem_fn' declared here mem_fn(_Rp _Tp::* __pm) _NOEXCEPT ^ 1 error generated. --------------------------------- std::mem_fun was deprecated in C++11 in favor of std::mem_fn and finally removed in C++17, so while it still may be around in GCC/stdlibc++ even with -std=c++17, it must no longer be used and cannot be expected to compile with other toolchains. This issue was newly introduced in 5.84.0, at least previous versions compiled with no issues. STEPS TO REPRODUCE 1. Compile with libc++ (Clang or GCC does not matter) OBSERVED RESULT Does not compile with libc++ due to use of std::mem_fun which was removed from C++17 EXPECTED RESULT Should compile with any standards-compliant toolchain SOFTWARE/OS VERSIONS KDE Frameworks Version: 5.84.0 -- You are receiving this mail because: You are watching all bug changes.