Support Concepts
More of a long term thing, but would it be possible to support concepts? I think this would only require an update to Clang 10, though updating to the latest version would be nice.
https://en.cppreference.com/w/cpp/compiler_support/20
Upstream is working on Clang13 (https://github.com/vgvassilev/cling/tree/cling-patches-llvm13). If memory serves me, there are ~40 tests still failing, so still some work on their end.
Apparently from that v13 on APIs are more stable, but also more parts of Cling are moving into Clang (for the benefit of lldb's interactive use), so fewer patches on Clang and thus their hope is that they can move faster to newer versions from there on out (or even build on top of unpatched Clang).
I have an interest in Clang13 b/c of CUDA support (CUDA support is available with current cppyy, but maxes out at CUDA 10.2, which then also limits gcc), i.e. I'll jump on it once available.
Any updates or time frame on this? Just curious for planning reasons.
These guys are hard to pin down, September is rumored: https://github.com/root-project/root/pull/10294
Myself, I'm too pre-occupied with Numba atm. to try out LLVM 13 (cppyy only needs a smaller subset, so may get there earlier), but will probably give it a try after the conferences in September if upstream hasn't delivered by that time yet.
Very nice library! Kudos! :+1:
C++20 is a game changer.
Since C++23 is coming out soon... is there any chance -- even if it's an early prototype -- of supporting C++20/23 through clang16?
Upstream is pretty much done with LLVM13, and I'm working on migration right now.
I understand from them that upgrades from LLVM13 onward should be easier, b/c many of the changes needed for Cling have been accepted into Clang/LLVM. I can't judge how much easier, but I also have no plans to front-run them, as there's enough other work to do. :) For sure, however, they won't upgrade LLVM versions until a production release is out, and 16 hasn't reached that stage yet.
$ EXTRA_CLING_ARGS=--std=c++20 python
Python 3.8.10 (default, Nov 14 2022, 12:59:47)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
using my private settings ...
>>> import cppyy
(Re-)building pre-compiled headers (options:--std=c++20); this may take a minute ...
>>> cppyy.cppdef("""\
... template<class T>
... concept C1 = true;
... """)
True
>>>
It's alive! :)
Upstream released support for LLVM13 today, but I've been tracking their repo, so was ready to go. On Linux, anyway: I need to test the other platforms before releasing to PyPI, but it can be build from source already if anyone is interested.