| Summary: | C++17 support | ||
|---|---|---|---|
| Product: | [Applications] KBibTeX | Reporter: | Alexander Dunlap <alexander.dunlap> |
| Component: | Compiling/packaging | Assignee: | Thomas Fischer <fischer> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | bugs.kde.org.await690, carl, orion |
| Priority: | NOR | ||
| Version First Reported In: | git (master) | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | 4d9ce600fdd1deb035a26e4f7922d35b2f41beaf | Version Fixed/Implemented In: | 0.10.1 |
| Sentry Crash Report: | |||
A possibly relevant merge request was started @ https://invent.kde.org/office/kbibtex/-/merge_requests/31 I noticed this problem some time ago, but missed to push a fix for that. Commit 4d9ce600fdd1de for branch kbibtex/0.10 and commit 7d609a0fc77b2a539 for master should address the compilation issue. A complete migration to C++17 when building KBibTeX on Qt6 is due next. *** Bug 499393 has been marked as a duplicate of this bug. *** Perhaps it would be worth doing a new release? *** Bug 500536 has been marked as a duplicate of this bug. *** |
C++17 is needed to compile. SUMMARY When I try to compile the latest Git version of kbibtex, I get the error message ``` [ 19%] Building CXX object src/io/CMakeFiles/kbibtexio.dir/encoderlatex.cpp.o In file included from /usr/include/unicode/unistr.h:39, from /usr/include/unicode/translit.h:27, from /home/ajd/Development/kbibtex/src/io/encoder.cpp:23: /usr/include/unicode/stringpiece.h:134:23: error: ‘is_same_v’ is not a member of ‘std’; did you mean ‘is_same’? 134 | (std::is_same_v<decltype(T().data()), const char*> | ^~~~~~~~~ | is_same /usr/include/unicode/stringpiece.h:134:66: error: template argument 1 is invalid 134 | (std::is_same_v<decltype(T().data()), const char*> | ^ /usr/include/unicode/stringpiece.h:138:17: error: expected ‘>’ before ‘)’ token 138 | ) && | ^ /usr/include/unicode/stringpiece.h:138:17: error: expected unqualified-id before ‘)’ token In file included from /usr/include/unicode/uenum.h:25, from /usr/include/unicode/utrans.h:22, from /usr/include/unicode/translit.h:29: /usr/include/unicode/localpointer.h:561:26: error: ‘auto’ parameter not permitted in this context 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)> () && { | ^ /usr/include/unicode/uenum.h:69:1: note: invalid template non-type parameter 69 | U_DEFINE_LOCAL_OPEN_POINTER(LocalUEnumerationPointer, UEnumeration, uenum_close); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/unicode/uset.h:358:1: note: invalid template non-type parameter 358 | U_DEFINE_LOCAL_OPEN_POINTER(LocalUSetPointer, USet, uset_close); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/unicode/utrans.h:258:1: note: invalid template non-type parameter 258 | U_DEFINE_LOCAL_OPEN_POINTER(LocalUTransliteratorPointer, UTransliterator, utrans_close); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ [ 19%] Building CXX object src/io/CMakeFiles/kbibtexio.dir/fileexporterbibtex2html.cpp.o make[2]: *** [src/io/CMakeFiles/kbibtexio.dir/build.make:99: src/io/CMakeFiles/kbibtexio.dir/encoder.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [CMakeFiles/Makefile2:1598: src/io/CMakeFiles/kbibtexio.dir/all] Error 2 make: *** [Makefile:146: all] Error 2 ``` STEPS TO REPRODUCE 1. 2. 3. OBSERVED RESULT EXPECTED RESULT SOFTWARE/OS VERSIONS Linux/KDE Plasma: Archlinux Qt Version: 5.15.15 ADDITIONAL INFORMATION Changing "14" to "17" on line 16 of CMakeLists.txt fixes this.