From 628a18e48ba38b60d6fe7502790f9856074adb09 Mon Sep 17 00:00:00 2001 From: dbonner Date: Tue, 16 Apr 2024 21:17:30 +1000 Subject: [PATCH] Add Jupyter kernels for C++20 and C++2b (Nb: C++2b is a working draft of C++23). --- tools/Jupyter/kernel/cling-cpp20/kernel.json | 10 ++++++++++ tools/Jupyter/kernel/cling-cpp2b/kernel.json | 10 ++++++++++ tools/Jupyter/kernel/clingkernel.py | 4 ++-- 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 tools/Jupyter/kernel/cling-cpp20/kernel.json create mode 100644 tools/Jupyter/kernel/cling-cpp2b/kernel.json diff --git a/tools/Jupyter/kernel/cling-cpp20/kernel.json b/tools/Jupyter/kernel/cling-cpp20/kernel.json new file mode 100644 index 0000000000..2a39a6a5bd --- /dev/null +++ b/tools/Jupyter/kernel/cling-cpp20/kernel.json @@ -0,0 +1,10 @@ +{ + "display_name": "C++20", + "argv": [ + "jupyter-cling-kernel", + "-f", + "{connection_file}", + "--std=c++20" + ], + "language": "C++" +} diff --git a/tools/Jupyter/kernel/cling-cpp2b/kernel.json b/tools/Jupyter/kernel/cling-cpp2b/kernel.json new file mode 100644 index 0000000000..8168c33c1e --- /dev/null +++ b/tools/Jupyter/kernel/cling-cpp2b/kernel.json @@ -0,0 +1,10 @@ +{ + "display_name": "C++2b", + "argv": [ + "jupyter-cling-kernel", + "-f", + "{connection_file}", + "--std=c++2b" + ], + "language": "C++" +} diff --git a/tools/Jupyter/kernel/clingkernel.py b/tools/Jupyter/kernel/clingkernel.py index 61cf6d6f97..17fcbd116e 100644 --- a/tools/Jupyter/kernel/clingkernel.py +++ b/tools/Jupyter/kernel/clingkernel.py @@ -90,8 +90,8 @@ def _banner_default(self): flush_interval = Float(0.25, config=True) std = CaselessStrEnum(default_value='c++11', - values = ['c++11', 'c++14', 'c++1z', 'c++17'], - help="C++ standard to use, either c++17, c++1z, c++14 or c++11").tag(config=True); + values = ['c++11', 'c++14', 'c++1z', 'c++17', 'c++20', 'c++2b'], + help="C++ standard to use, either c++2b, c++20, c++17, c++1z, c++14 or c++11").tag(config=True); def __init__(self, **kwargs): super(ClingKernel, self).__init__(**kwargs)