C++20 support in OpenCL
What are the plans to add support for C++20 in C++ for OpenCL? I understand C++20 is huge and many features don't make sense in device code. But a subset of C++20 could still be beneficial. For our use case, we would be particularly interested in compile time evaluation with the consteval keyword.
First of all, thank you for reaching out.
As far as C++20 and C++ for OpenCL is concerned, there are no ongoing efforts (that the OpenCL Working Group is aware of) to take it from the existing C++17 subset to something based on C++20. It is not to say it wouldn't be useful if such an effort existed. Should you or anyone else reading have the capacity to start cracking at doing the work of extending the existing support in Clang[^1] (or wherever) and explore how to amend the spec in this repo, do not hold back. Do you perhaps have a list of features you have in mind beside consteval? The usual "static C++" subset should work without an exorbitant (but non-zero) amount of work. Personally I'd much enjoy using template lambdas in device code if it were possible.
While the working-group has developed extensions in the public before (see cl_khr_unified_svm, do note that modifying the spec itself is reserved to the OpenCL Working Group of Khronos. While it is unprecedented for extensions (or revisions) to materialize from dominantly external contribution, it's not impossible, especially for vendor neutral (cl_ext_xyz, not cl_khr_xyz) extensions. I don't see anyone refusing to take quality external work and not give their blessing.
[^1]: Take the LLVM sources off the shelf, modify LangStandards.def to encompass C++20 and start hacking away, see what features work, what need tweaking and write tests while you do it. The existing implementation was mostly tested with SPIR-V as the back-end, to some extent with PTX. Extra points for adding related tests to OpenCL-CTS.