jupyter-xeus / xeus-cling

Jupyter kernel for the C++ programming language
BSD 3-Clause "New" or "Revised" License
3.01k stars 294 forks source link

Please remove the use of deprecated C++ features #501

Open yurivict opened 8 months ago

yurivict commented 8 months ago

Build fails because you use the C++ features that were deprecated in C++17:

In file included from /usr/ports/devel/xeus-cling/work/xeus-cling-0.15.3/src/main.cpp:30:
In file included from /usr/ports/devel/xeus-cling/work/xeus-cling-0.15.3/include/xeus-cling/xinterpreter.hpp:17:
In file included from /usr/local/llvm50_cern-root/include/cling/Interpreter/Interpreter.h:15:
In file included from /usr/local/llvm50_cern-root/include/llvm/ADT/StringRef.h:13:
/usr/local/llvm50_cern-root/include/llvm/ADT/STLExtras.h:60:31: error: no template named 'unary_function' in namespace 'std'; did you mean '__unary_function'?
struct identity : public std::unary_function<Ty, Ty> {
                         ~~~~~^~~~~~~~~~~~~~
                              __unary_function
/usr/include/c++/v1/__functional/unary_function.h:46:1: note: '__unary_function' declared here
using __unary_function = __unary_function_keep_layout_base<_Arg, _Result>;
^
In file included from /usr/ports/devel/xeus-cling/work/xeus-cling-0.15.3/src/main.cpp:30:
In file included from /usr/ports/devel/xeus-cling/work/xeus-cling-0.15.3/include/xeus-cling/xinterpreter.hpp:17:
In file included from /usr/local/llvm50_cern-root/include/cling/Interpreter/Interpreter.h:15:
In file included from /usr/local/llvm50_cern-root/include/llvm/ADT/StringRef.h:13:
/usr/local/llvm50_cern-root/include/llvm/ADT/STLExtras.h:70:31: error: no template named 'binary_function' in namespace 'std'; did you mean '__binary_function'?
struct less_ptr : public std::binary_function<Ty, Ty, bool> {
                         ~~~~~^~~~~~~~~~~~~~~
                              __binary_function

The errors actually come from the cling sources. cling appears to be unsupported since the last update was in 2020, 3 years ago.

We have cling-0.5.2018.08.13_12. I don't think that cling-2020 even builds. Only Arch linux has cling-2020 installed from the binary distribution. Otherwise, nobody can build it.

What can be done here?

Version: 0.15.3 clang-16 FreeBSD 13.2