Skip to content

Compilation does not pass with C++23 standard #1042

@kelson42

Description

@kelson42
[28/139] Compiling C++ object src/libzim.so.9.5.0.p/fileimpl.cpp.o
FAILED: src/libzim.so.9.5.0.p/fileimpl.cpp.o 
ccache c++ -Isrc/libzim.so.9.5.0.p -Isrc -I../src -Iinclude -I../include -Istatic -fdiagnostics-color=always -Wall -Winvalid-pch -Werror -std=c++23 -O0 -g -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DLIBZIM_EXPORT_PRIVATE_DLL -fPIC -pthread -MD -MQ src/libzim.so.9.5.0.p/fileimpl.cpp.o -MF src/libzim.so.9.5.0.p/fileimpl.cpp.o.d -o src/libzim.so.9.5.0.p/fileimpl.cpp.o -c ../src/fileimpl.cpp
../src/fileimpl.cpp: In lambda function:
../src/fileimpl.cpp:523:52: error: implicit capture of ‘this’ via ‘[=]’ is deprecated in C++20 [-Werror=deprecated]
  523 |     auto cluster = getClusterCache().getOrPut(key, [=](){ return readCluster(idx); });
      |                                                    ^
../src/fileimpl.cpp:523:52: note: add explicit ‘this’ or ‘*this’ capture
cc1plus: all warnings being treated as errors
[37/139] Compiling C++ object src/libzim.so.9.5.0.p/writer_creator.cpp.o
ninja: build stopped: subcommand failed.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions