Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
b944745
[ci] add debian13
silverweed Sep 25, 2025
ecd64e5
[ntuple] minor improvement in RArrayField
jblomer Sep 28, 2025
fd7ac5f
[cling] Unload all redecls of ClassTemplateDecl
devajithvs Jul 17, 2025
017b8bf
[cling] Add test for template unloading
devajithvs Sep 25, 2025
03a939d
[ntuple] Improve documentation of RNTupleParallelWriter
hahnjo Sep 25, 2025
c949817
[ntuple] Move RNTupleParallelWriter out of Experimental
hahnjo Sep 25, 2025
b679891
[thisroot] resolve reexec sh on macos
ferdymercury Sep 29, 2025
27919d8
[skip-ci] fix typo
ferdymercury Sep 29, 2025
bb13ea7
[core] Reduce linked libraries for tests
hahnjo Sep 29, 2025
4ffe203
[core] Link libCling against libCore
hahnjo Sep 29, 2025
ac525d2
[core] Specify linker options as PRIVATE
hahnjo Sep 29, 2025
f7ef444
[core] Remove deprecated macOS linker flag(s)
hahnjo Sep 29, 2025
43ed943
[ntuple] unpublish RRVecField internals
jblomer Sep 27, 2025
3236a29
[ntuple] test automatic schema evolution between enums
jblomer Sep 29, 2025
709f2d0
[RF] Remove unimplemented `RooWorkspace::merge()` function
guitargeek Sep 29, 2025
bf2a717
[cppyy] Remove checks for C++ standard
guitargeek Sep 29, 2025
5a9096f
[RF] Implement RooLinkedList::contains()
guitargeek Sep 29, 2025
3bd863f
[RF] Add `RooAbsCollection::contains()` override for name argument
guitargeek Sep 29, 2025
1c245bf
[CPyCppyy] Don't re-implement `contains()` in Python if already present
guitargeek Sep 29, 2025
a23a59f
[webgui] empty clear on close when pending connection removed
linev Sep 25, 2025
c17e81e
[webgui] add reconnect timeout for web connection
linev Sep 25, 2025
7fa88a8
[webgui] let disable reconnect
linev Sep 25, 2025
8b8ceea
[rbrowser] add Sync method for let process widget actions
linev Sep 25, 2025
420b0e1
[webgui] use doClearOnClose variable name in new code
linev Sep 25, 2025
0b4c110
[math] Remove custom derivatives of `TMath::Min()` and `Max()`
guitargeek Sep 29, 2025
259f4e6
[RF] Expose again interface to write NLL codegen debug macro
guitargeek Sep 29, 2025
e251012
[docs] Update the file name of a tutorial referenced from THnSparse.
hageboeck Sep 29, 2025
2f64878
[nfc][tree] improve TTree::Scan redirect docu
ferdymercury Oct 1, 2025
9566777
[gui] Always compile RNTuple providers
hahnjo Sep 25, 2025
9597890
[tutorials] Simplify ROOT 7 vetos
hahnjo Sep 25, 2025
4f29a50
[core] Use version script to hide symbols in libCling
hahnjo Sep 19, 2025
ee8598f
[ntuple] Properly set the NTupleName in sources created from anchors
silverweed Sep 30, 2025
438c186
[clad] Power can take arguments of different types.
vgvassilev Sep 27, 2025
5205599
[clad] Bump to v2.1
vgvassilev Sep 21, 2025
50af423
[InterOp] Fix a build failure on Gentoo.
hageboeck Sep 30, 2025
ab96a8d
[InterOp] Prevent a configure failure when offline.
hageboeck Sep 30, 2025
c3e4cad
[ntuple] automatic schema evolution from streamer to class field
jblomer Sep 29, 2025
98467d4
[unix] add icpx to compiler options
ferdymercury Oct 2, 2025
97fe94f
Added login into bash shell and env variable 'HOME=/Users/sftnight' t…
Ni-Langguth Sep 10, 2025
9e8635f
[hist] Implement initial RHistStats
hahnjo Sep 16, 2025
eef34c3
[hist] Implement RHistStats::Compute{Skewnewss,Kurtosis}
hahnjo Sep 16, 2025
5bcfda2
[hist] Implement weighted filling of RHistStats
hahnjo Sep 16, 2025
a5fe9ef
[hist] Add microbenchmarks for RHistStats::Fill
hahnjo Sep 19, 2025
7cf01d4
[hist] Protect against zero variance
hahnjo Sep 29, 2025
a7f2531
[hist] Improve stability of ComputeVariance()
hahnjo Sep 29, 2025
862993a
[hist] Implement initial RHist
hahnjo Sep 23, 2025
04a0dc8
[hist] Implement RHistStats::Add
hahnjo Sep 23, 2025
7e4aea3
[hist] Implement RHistStats::Clear
hahnjo Sep 23, 2025
93a0d2e
[hist] Implement RHist::{Add,Clear,Clone}
hahnjo Sep 23, 2025
2d85462
[hist] Request dictionaries for common RHist<T>
hahnjo Sep 23, 2025
ea24c8a
[df] Remove unnecessary header inclusion
vepadulano Oct 2, 2025
9b7193b
[Python][UHI] Integrate the UHI testing suite
siliataider Oct 1, 2025
ef1b534
[thisroot] resolve symbolic links
ferdymercury Oct 3, 2025
4157d78
[RF] Update xroofit
will-cern Oct 3, 2025
bf591da
[Minuit2] Change Minimizer::GlobalCC() to always return all values
guitargeek Jun 5, 2025
0213076
[Minuit2] Refactor to initialize class members in the class declaration
guitargeek Jul 10, 2025
77951c7
[Minuit2] Only compute global correlation matrix when needed
guitargeek Jun 5, 2025
b64dc28
[Minuit2] Use native FCNBase type in NumericalDerivator class
guitargeek Oct 4, 2025
7655c54
[Minuit2] Use smart pointers in Minuit2Minimizer
guitargeek Oct 3, 2025
143582c
[RF] Refactor multiprocess minimizer code to use Minuit 2 directly
guitargeek Oct 4, 2025
04f1a45
[Math] Don't leak Minuit 2 implementation details to IFunction classes
guitargeek Oct 4, 2025
1ea6400
[Minuit2] Merge FCNAdapter with -GradAdapter and use only std::function
guitargeek Oct 4, 2025
1caf729
[Minuit2] Improve FCNBase and FCNAdapter documentation
guitargeek Oct 3, 2025
ee67000
[RelNotes] Mention Minuit 2 interface changes related to FCN adapters
guitargeek Oct 3, 2025
5001fc7
Fix TH2 and TH3 arithmetic operators in Python
siliataider Oct 3, 2025
641ad3e
Add tests for TH2 and TH3 arithmetic operations
siliataider Oct 3, 2025
a14eac8
[RDF] mention shortcut for omitting NaNs when calculating mean
ferdymercury Oct 5, 2025
3e94138
[rottest] Remove outdated test using boost
dpiparo Oct 5, 2025
c3f7019
[nfc][tree] Clarify prefetch behavior
ferdymercury Sep 22, 2025
412a499
[RF] Fix rf619_discrete_profiling tutorial in overview page
guitargeek Oct 3, 2025
f82fa96
[AdaptiveCpp] Update adaptivecpp tag
devajithvs Sep 26, 2025
1427667
[SYCL] Add interpreter tutorials for SYCL
devajithvs Sep 26, 2025
da1ebd9
[SYCL] Add genvectorx tutorials for SYCL
devajithvs Sep 26, 2025
313b46d
[core] Garbage collect unused sections in libCling
hahnjo Oct 1, 2025
4731fd5
[core] Strip libCling after build
hahnjo Oct 1, 2025
07a8adb
[roottest] Delete outdated boost header directory
ferdymercury Oct 6, 2025
9166eb5
Import ROOT-llvm20
devajithvs Jul 17, 2025
cef0fd0
[cling][LLVM20] Misc adaptations for updated APIs
devajithvs Feb 20, 2025
58bc73c
[cling][LLVM20] Use TemplateArgumentLoc for type-param DefaultArgument
devajithvs Sep 24, 2025
9b9db4e
[cling] Adapt to LLVM 20 OptTable changes
devajithvs Sep 24, 2025
44a9dc1
[cling] ProcessWarningOptions now requires VFS
devajithvs Sep 24, 2025
4c9c1ef
[cling][LLVM20] Adapt to LLVM20 enum changes
devajithvs Sep 24, 2025
a0212dc
[core][LLVM20] Adapt to LLVM 20 API changes
devajithvs Sep 24, 2025
00b7332
[roottest] Fix ErrorDiagnostics test
devajithvs Jun 27, 2025
261ac86
[cling][test] Add a new expected warning post LLVM20
devajithvs Aug 15, 2025
bba4ce2
[cling][AST] Desugar TemplateName before fully qualifying it
devajithvs Aug 13, 2025
3d4acf8
[cling] Avoid const-eval of RecoveryExpr in type/name lookup
devajithvs Sep 3, 2025
93cc998
[cling] Fix missing space before attributes in ForwardDeclPrinter
devajithvs Sep 3, 2025
672d447
[cling] Remove usage of deprecated `getDirectory` and `getFileRef` me…
devajithvs Sep 17, 2025
e9ad5ab
[cling] Skip invalid TopLevelStmtDecls in dumps
devajithvs Sep 18, 2025
ee83882
[interpreter] Fix Windows build failures with LLVM 20
devajithvs Sep 9, 2025
0204fdd
[TClingUtils] Fix normalization of variadic template classes
hahnjo Oct 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions .github/workflows/root-ci-config/buildconfig/debian13.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CMAKE_CXX_STANDARD=23
17 changes: 12 additions & 5 deletions .github/workflows/root-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,15 @@ jobs:

- name: Set up curl CA bundle for Davix to work with https
run: 'echo SSL_CERT_FILE=/opt/local/share/curl/curl-ca-bundle.crt >> $GITHUB_ENV'

- name: Pull Request Build
shell: bash -leo pipefail {0}
if: github.event_name == 'pull_request'
env:
HOME: /Users/sftnight
INCREMENTAL: ${{ !contains(github.event.pull_request.labels.*.name, 'clean build') }}
GITHUB_PR_ORIGIN: ${{ github.event.pull_request.head.repo.clone_url }}
run: ".github/workflows/root-ci-config/build_root.py
run: ".github/workflows/root-ci-config/build_root.py
--buildtype RelWithDebInfo
--incremental $INCREMENTAL
--base_ref ${{ github.base_ref }}
Expand All @@ -177,8 +179,9 @@ jobs:
--platform ${{ matrix.platform }}"

- name: Workflow dispatch
shell: bash -leo pipefail {0}
if: ${{ github.event_name == 'workflow_dispatch' && !matrix.is_special }}
run: ".github/workflows/root-ci-config/build_root.py
run: ".github/workflows/root-ci-config/build_root.py
--buildtype ${{ inputs.buildtype }}
--platform ${{ matrix.platform }}
--incremental ${{ inputs.incremental }}
Expand All @@ -188,8 +191,9 @@ jobs:
--repository ${{ github.server_url }}/${{ github.repository }}"

- name: Nightly build
shell: bash -leo pipefail {0}
if: github.event_name == 'schedule'
run: ".github/workflows/root-ci-config/build_root.py
run: ".github/workflows/root-ci-config/build_root.py
--buildtype Release
--platform ${{ matrix.platform }}
--incremental false
Expand All @@ -198,8 +202,9 @@ jobs:
--repository ${{ github.server_url }}/${{ github.repository }}"

- name: Update build cache after push to release branch
shell: bash -leo pipefail {0}
if: github.event_name == 'push'
run: ".github/workflows/root-ci-config/build_root.py
run: ".github/workflows/root-ci-config/build_root.py
--buildtype RelWithDebInfo
--platform ${{ matrix.platform }}
--incremental false
Expand Down Expand Up @@ -391,6 +396,8 @@ jobs:
overrides: ["CMAKE_CXX_STANDARD=23"]
- image: debian125
overrides: ["CMAKE_CXX_STANDARD=20", "dev=ON", "CMAKE_CXX_FLAGS=-Wsuggest-override"]
- image: debian13
overrides: ["dev=ON", "CMAKE_CXX_FLAGS=-Wsuggest-override"]
# Special builds
- image: alma9
is_special: true
Expand Down
14 changes: 14 additions & 0 deletions README/ReleaseNotes/v638/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,25 @@ The following people have contributed to this new version:

* Behaviour change: the behaviour of `TChain::SetBranchStatus` has been aligned to the one of `TTree::SetBranchStatus`. In particular, when `SetBranchStatus` is called to deactivate all branches, a subsequent call to `TChain::SetBranchAddress` would override the previous instruction and activate that single branch. Instead `TTree::SetBranchAddress` respects the rule imposed by `SetBranchStatus`. If a user needs to activate only one or more branches, they should call `SetBranchStatus("brName", true)` on each branch that needs to be active in the TChain, like it was already necessary for a TTree. See https://github.com/root-project/root/pull/19221 for more details.

### RNTuple

* The parallel writer is now part of the public, stable API. The `RNTupleParallelWriter` and the closely related `RNTupleFillContext` moved from the `ROOT::Experimental` to the `ROOT` namespace.

## Math

### Minimizer interface

* The function `double ROOT::Math::Minimizer::GlobalCC(unsigned int ivar)` was changed to `std::vector<double> ROOT::Math::Minimizer::GlobalCC()`, always returning the full list of global correlations.
This change was needed because global correlations are not unconditionally computed and cached in the minimizer anymore. Only computing them when calling `GlobalCC()` avoids unneeded overhead when global correlations are not required.

### Minuit2

* Behavior change: building ROOT using `minuit2_omp=ON` option no longer enables OpenMP parallelization by default. One has to call now additionally GradientCalculator::SetParallelOMP().
* The functionality of the `FCNGradAdapter` got absorbed into the `FCNAdapter`. This also means that the `FCNGradAdapter.h` header is gone.
* The `ROOT::Minuit2::FCNAdapter` is no longer templated and now handle only functions with this exact signatures:
* `double(double const *)` for the wrapped function
* `void(double const *, double *)` for the gradient
The advantage of this restriction is that the `FCNAdapter` can now also wrap any Python function that respects this interface.

## RooFit

Expand Down
13 changes: 1 addition & 12 deletions bindings/pyroot/cppyy/CPyCppyy/src/Converters.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@
#include <regex>
#include <utility>
#include <sstream>
#if (__cplusplus > 201402L) || (defined(_MSC_VER) && _MSVC_LANG > 201402L)
#include <cstddef>
#include <string_view>
#endif

// codecvt does not exist for gcc4.8.5 and is in principle deprecated; it is
// only used in py2 for char -> wchar_t conversion for std::wstring; if not
// available, the conversion is done through Python (requires an extra copy)
Expand Down Expand Up @@ -1777,9 +1776,7 @@ bool CPyCppyy::name##ArrayConverter::ToMemory( \
CPPYY_IMPL_ARRAY_CONVERTER(Bool, c_bool, bool, '?', )
CPPYY_IMPL_ARRAY_CONVERTER(SChar, c_char, signed char, 'b', )
CPPYY_IMPL_ARRAY_CONVERTER(UChar, c_ubyte, unsigned char, 'B', )
#if (__cplusplus > 201402L) || (defined(_MSC_VER) && _MSVC_LANG > 201402L)
CPPYY_IMPL_ARRAY_CONVERTER(Byte, c_ubyte, std::byte, 'B', )
#endif
CPPYY_IMPL_ARRAY_CONVERTER(Int8, c_byte, int8_t, 'b', _i8)
CPPYY_IMPL_ARRAY_CONVERTER(Int16, c_int16, int16_t, 'h', _i16)
CPPYY_IMPL_ARRAY_CONVERTER(Int32, c_int32, int32_t, 'i', _i32)
Expand Down Expand Up @@ -2032,7 +2029,6 @@ bool CPyCppyy::STLWStringConverter::ToMemory(PyObject* value, void* address, PyO
}


#if (__cplusplus > 201402L) || (defined(_MSC_VER) && _MSVC_LANG > 201402L)
CPyCppyy::STLStringViewConverter::STLStringViewConverter(bool keepControl) :
InstanceConverter(Cppyy::GetScope("std::string_view"), keepControl) {}

Expand Down Expand Up @@ -2112,7 +2108,6 @@ bool CPyCppyy::STLStringViewConverter::ToMemory(

return false;
}
#endif


bool CPyCppyy::STLStringMoveConverter::SetArg(
Expand Down Expand Up @@ -3563,9 +3558,7 @@ static struct InitConvFactories_t {
gf["SCharAsInt[]"] = gf["signed char ptr"];
gf["UCharAsInt*"] = gf["unsigned char ptr"];
gf["UCharAsInt[]"] = gf["unsigned char ptr"];
#if (__cplusplus > 201402L) || (defined(_MSC_VER) && _MSVC_LANG > 201402L)
gf["std::byte ptr"] = (cf_t)+[](cdims_t d) { return new ByteArrayConverter{d}; };
#endif
gf["int8_t ptr"] = (cf_t)+[](cdims_t d) { return new Int8ArrayConverter{d}; };
gf["int16_t ptr"] = (cf_t)+[](cdims_t d) { return new Int16ArrayConverter{d}; };
gf["int32_t ptr"] = (cf_t)+[](cdims_t d) { return new Int32ArrayConverter{d}; };
Expand All @@ -3590,14 +3583,12 @@ static struct InitConvFactories_t {
// aliases
gf["signed char"] = gf["char"];
gf["const signed char&"] = gf["const char&"];
#if (__cplusplus > 201402L) || (defined(_MSC_VER) && _MSVC_LANG > 201402L)
gf["std::byte"] = gf["uint8_t"];
gf["byte"] = gf["uint8_t"];
gf["const std::byte&"] = gf["const uint8_t&"];
gf["const byte&"] = gf["const uint8_t&"];
gf["std::byte&"] = gf["uint8_t&"];
gf["byte&"] = gf["uint8_t&"];
#endif
gf["std::int8_t"] = gf["int8_t"];
gf["const std::int8_t&"] = gf["const int8_t&"];
gf["std::int8_t&"] = gf["int8_t&"];
Expand Down Expand Up @@ -3651,13 +3642,11 @@ static struct InitConvFactories_t {
gf["const string&"] = gf["std::string"];
gf["std::string&&"] = (cf_t)+[](cdims_t) { return new STLStringMoveConverter{}; };
gf["string&&"] = gf["std::string&&"];
#if (__cplusplus > 201402L) || (defined(_MSC_VER) && _MSVC_LANG > 201402L)
gf["std::string_view"] = (cf_t)+[](cdims_t) { return new STLStringViewConverter{}; };
gf[STRINGVIEW] = gf["std::string_view"];
gf["std::string_view&"] = gf["std::string_view"];
gf["const std::string_view&"] = gf["std::string_view"];
gf["const " STRINGVIEW "&"] = gf["std::string_view"];
#endif
gf["std::wstring"] = (cf_t)+[](cdims_t) { return new STLWStringConverter{}; };
gf[WSTRING1] = gf["std::wstring"];
gf[WSTRING2] = gf["std::wstring"];
Expand Down
4 changes: 0 additions & 4 deletions bindings/pyroot/cppyy/CPyCppyy/src/DeclareConverters.h
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,7 @@ class CString32Converter : public Converter {
CPPYY_DECLARE_ARRAY_CONVERTER(Bool);
CPPYY_DECLARE_ARRAY_CONVERTER(SChar);
CPPYY_DECLARE_ARRAY_CONVERTER(UChar);
#if (__cplusplus > 201402L) || (defined(_MSC_VER) && _MSVC_LANG > 201402L)
CPPYY_DECLARE_ARRAY_CONVERTER(Byte);
#endif
CPPYY_DECLARE_ARRAY_CONVERTER(Int8);
CPPYY_DECLARE_ARRAY_CONVERTER(Int16);
CPPYY_DECLARE_ARRAY_CONVERTER(Int32);
Expand Down Expand Up @@ -384,9 +382,7 @@ protected: \

CPPYY_DECLARE_STRING_CONVERTER(STLString, std::string);
CPPYY_DECLARE_STRING_CONVERTER(STLWString, std::wstring);
#if (__cplusplus > 201402L) || (defined(_MSC_VER) && _MSVC_LANG > 201402L)
CPPYY_DECLARE_STRING_CONVERTER(STLStringView, std::string_view);
#endif

class STLStringMoveConverter : public STLStringConverter {
public:
Expand Down
4 changes: 0 additions & 4 deletions bindings/pyroot/cppyy/CPyCppyy/src/DeclareExecutors.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
#include "Dimensions.h"

// Standard
#if (__cplusplus > 201402L) || (defined(_MSC_VER) && _MSVC_LANG > 201402L)
#include <cstddef>
#endif


namespace CPyCppyy {
Expand Down Expand Up @@ -65,9 +63,7 @@ CPPYY_ARRAY_DECL_EXEC(Void);
CPPYY_ARRAY_DECL_EXEC(Bool);
CPPYY_ARRAY_DECL_EXEC(SChar);
CPPYY_ARRAY_DECL_EXEC(UChar);
#if (__cplusplus > 201402L) || (defined(_MSC_VER) && _MSVC_LANG > 201402L)
CPPYY_ARRAY_DECL_EXEC(Byte);
#endif
CPPYY_ARRAY_DECL_EXEC(Int8);
CPPYY_ARRAY_DECL_EXEC(UInt8);
CPPYY_ARRAY_DECL_EXEC(Short);
Expand Down
6 changes: 0 additions & 6 deletions bindings/pyroot/cppyy/CPyCppyy/src/Executors.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -510,9 +510,7 @@ PyObject* CPyCppyy::name##ArrayExecutor::Execute( \
CPPYY_IMPL_ARRAY_EXEC(Bool, bool, )
CPPYY_IMPL_ARRAY_EXEC(SChar, signed char, )
CPPYY_IMPL_ARRAY_EXEC(UChar, unsigned char, )
#if (__cplusplus > 201402L) || (defined(_MSC_VER) && _MSVC_LANG > 201402L)
CPPYY_IMPL_ARRAY_EXEC(Byte, std::byte, )
#endif
CPPYY_IMPL_ARRAY_EXEC(Int8, int8_t, _i8)
CPPYY_IMPL_ARRAY_EXEC(UInt8, uint8_t, _i8)
CPPYY_IMPL_ARRAY_EXEC(Short, short, )
Expand Down Expand Up @@ -1019,12 +1017,10 @@ struct InitExecFactories_t {
gf["bool ptr"] = (ef_t)+[](cdims_t d) { return new BoolArrayExecutor{d}; };
gf["unsigned char ptr"] = (ef_t)+[](cdims_t d) { return new UCharArrayExecutor{d}; };
gf["const unsigned char ptr"] = gf["unsigned char ptr"];
#if (__cplusplus > 201402L) || (defined(_MSC_VER) && _MSVC_LANG > 201402L)
gf["std::byte ptr"] = (ef_t)+[](cdims_t d) { return new ByteArrayExecutor{d}; };
gf["const std::byte ptr"] = gf["std::byte ptr"];
gf["byte ptr"] = gf["std::byte ptr"];
gf["const byte ptr"] = gf["std::byte ptr"];
#endif
gf["int8_t ptr"] = (ef_t)+[](cdims_t d) { return new Int8ArrayExecutor{d}; };
gf["uint8_t ptr"] = (ef_t)+[](cdims_t d) { return new UInt8ArrayExecutor{d}; };
gf["short ptr"] = (ef_t)+[](cdims_t d) { return new ShortArrayExecutor{d}; };
Expand All @@ -1046,14 +1042,12 @@ struct InitExecFactories_t {
gf["internal_enum_type_t"] = gf["int"];
gf["internal_enum_type_t&"] = gf["int&"];
gf["internal_enum_type_t ptr"] = gf["int ptr"];
#if (__cplusplus > 201402L) || (defined(_MSC_VER) && _MSVC_LANG > 201402L)
gf["std::byte"] = gf["uint8_t"];
gf["byte"] = gf["uint8_t"];
gf["std::byte&"] = gf["uint8_t&"];
gf["byte&"] = gf["uint8_t&"];
gf["const std::byte&"] = gf["const uint8_t&"];
gf["const byte&"] = gf["const uint8_t&"];
#endif
gf["std::int8_t"] = gf["int8_t"];
gf["std::int8_t&"] = gf["int8_t&"];
gf["const std::int8_t&"] = gf["const int8_t&"];
Expand Down
4 changes: 0 additions & 4 deletions bindings/pyroot/cppyy/CPyCppyy/src/LowLevelViews.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1001,10 +1001,8 @@ template<> struct typecode_traits<signed char> {
static constexpr const char* format = "b"; static constexpr const char* name = "SCharAsInt"; };
template<> struct typecode_traits<unsigned char> {
static constexpr const char* format = "B"; static constexpr const char* name = "UCharAsInt"; };
#if (__cplusplus > 201402L) || (defined(_MSC_VER) && _MSVC_LANG > 201402L)
template<> struct typecode_traits<std::byte> {
static constexpr const char* format = "B"; static constexpr const char* name = "UCharAsInt"; };
#endif
template<> struct typecode_traits<char*> {
static constexpr const char* format = "b"; static constexpr const char* name = "char*"; };
template<> struct typecode_traits<const char*> {
Expand Down Expand Up @@ -1142,9 +1140,7 @@ PyObject* CPyCppyy::CreateLowLevelView(type** address, cdims_t shape) { \
CPPYY_IMPL_VIEW_CREATOR(bool);
CPPYY_IMPL_VIEW_CREATOR(signed char);
CPPYY_IMPL_VIEW_CREATOR(unsigned char);
#if (__cplusplus > 201402L) || (defined(_MSC_VER) && _MSVC_LANG > 201402L)
CPPYY_IMPL_VIEW_CREATOR(std::byte);
#endif
CPPYY_IMPL_VIEW_CREATOR(short);
CPPYY_IMPL_VIEW_CREATOR(unsigned short);
CPPYY_IMPL_VIEW_CREATOR(int);
Expand Down
4 changes: 0 additions & 4 deletions bindings/pyroot/cppyy/CPyCppyy/src/LowLevelViews.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
// Standard
#include <complex>
#include <stddef.h>
#if (__cplusplus > 201402L) || (defined(_MSC_VER) && _MSVC_LANG > 201402L)
#include <cstddef>
#endif


namespace CPyCppyy {
Expand Down Expand Up @@ -49,9 +47,7 @@ CPPYY_DECL_VIEW_CREATOR(bool);
CPPYY_DECL_VIEW_CREATOR(char);
CPPYY_DECL_VIEW_CREATOR(signed char);
CPPYY_DECL_VIEW_CREATOR(unsigned char);
#if (__cplusplus > 201402L) || (defined(_MSC_VER) && _MSVC_LANG > 201402L)
CPPYY_DECL_VIEW_CREATOR(std::byte);
#endif
PyObject* CreateLowLevelView_i8(int8_t*, cdims_t shape);
PyObject* CreateLowLevelView_i8(int8_t**, cdims_t shape);
PyObject* CreateLowLevelView_i8(uint8_t*, cdims_t shape);
Expand Down
3 changes: 3 additions & 0 deletions bindings/pyroot/cppyy/CPyCppyy/src/PyStrings.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
PyObject* CPyCppyy::PyStrings::gAssign = nullptr;
PyObject* CPyCppyy::PyStrings::gBases = nullptr;
PyObject* CPyCppyy::PyStrings::gBase = nullptr;
PyObject* CPyCppyy::PyStrings::gContains = nullptr;
PyObject* CPyCppyy::PyStrings::gCopy = nullptr;
PyObject* CPyCppyy::PyStrings::gCppBool = nullptr;
PyObject* CPyCppyy::PyStrings::gCppName = nullptr;
Expand Down Expand Up @@ -88,6 +89,7 @@ bool CPyCppyy::CreatePyStrings() {
CPPYY_INITIALIZE_STRING(gAssign, __assign__);
CPPYY_INITIALIZE_STRING(gBases, __bases__);
CPPYY_INITIALIZE_STRING(gBase, __base__);
CPPYY_INITIALIZE_STRING(gContains, contains);
CPPYY_INITIALIZE_STRING(gCopy, copy);
#if PY_VERSION_HEX < 0x03000000
CPPYY_INITIALIZE_STRING(gCppBool, __cpp_nonzero__);
Expand Down Expand Up @@ -171,6 +173,7 @@ PyObject* CPyCppyy::DestroyPyStrings() {
// Remove all cached python strings.
Py_DECREF(PyStrings::gBases); PyStrings::gBases = nullptr;
Py_DECREF(PyStrings::gBase); PyStrings::gBase = nullptr;
Py_DECREF(PyStrings::gContains); PyStrings::gContains = nullptr;
Py_DECREF(PyStrings::gCopy); PyStrings::gCopy = nullptr;
Py_DECREF(PyStrings::gCppBool); PyStrings::gCppBool = nullptr;
Py_DECREF(PyStrings::gCppName); PyStrings::gCppName = nullptr;
Expand Down
1 change: 1 addition & 0 deletions bindings/pyroot/cppyy/CPyCppyy/src/PyStrings.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ namespace PyStrings {
extern PyObject* gAssign;
extern PyObject* gBases;
extern PyObject* gBase;
extern PyObject* gContains;
extern PyObject* gCopy;
extern PyObject* gCppBool;
extern PyObject* gCppName;
Expand Down
18 changes: 17 additions & 1 deletion bindings/pyroot/cppyy/CPyCppyy/src/Pythonize.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -898,6 +898,7 @@ PyObject* MapInit(PyObject* self, PyObject* args, PyObject* /* kwds */)
return nullptr;
}

#if __cplusplus <= 202002L
PyObject* STLContainsWithFind(PyObject* self, PyObject* obj)
{
// Implement python's __contains__ for std::map/std::set
Expand All @@ -924,6 +925,7 @@ PyObject* STLContainsWithFind(PyObject* self, PyObject* obj)

return result;
}
#endif


//- set behavior as primitives ------------------------------------------------
Expand Down Expand Up @@ -1266,6 +1268,7 @@ PyObject* STLStringDecode(CPPInstance* self, PyObject* args, PyObject* kwds)
return PyUnicode_Decode(obj->data(), obj->size(), encoding, errors);
}

#if __cplusplus <= 202302L
PyObject* STLStringContains(CPPInstance* self, PyObject* pyobj)
{
std::string* obj = GetSTLString(self);
Expand All @@ -1282,6 +1285,7 @@ PyObject* STLStringContains(CPPInstance* self, PyObject* pyobj)

Py_RETURN_FALSE;
}
#endif

PyObject* STLStringReplace(CPPInstance* self, PyObject* args, PyObject* /*kwds*/)
{
Expand Down Expand Up @@ -1654,6 +1658,10 @@ bool CPyCppyy::Pythonize(PyObject* pyclass, const std::string& name)
Utility::AddToClass(pyclass, "__len__", "size");
}

if (HasAttrDirect(pyclass, PyStrings::gContains)) {
Utility::AddToClass(pyclass, "__contains__", "contains");
}

if (!IsTemplatedSTLClass(name, "vector") && // vector is dealt with below
!((PyTypeObject*)pyclass)->tp_iter) {
if (HasAttrDirect(pyclass, PyStrings::gBegin) && HasAttrDirect(pyclass, PyStrings::gEnd)) {
Expand Down Expand Up @@ -1885,16 +1893,21 @@ bool CPyCppyy::Pythonize(PyObject* pyclass, const std::string& name)
// constructor that takes python associative collections
Utility::AddToClass(pyclass, "__real_init", "__init__");
Utility::AddToClass(pyclass, "__init__", (PyCFunction)MapInit, METH_VARARGS | METH_KEYWORDS);

#if __cplusplus <= 202002L
// From C++20, std::map and std::unordered_map already implement a contains() method.
Utility::AddToClass(pyclass, "__contains__", (PyCFunction)STLContainsWithFind, METH_O);
#endif
}

else if (IsTemplatedSTLClass(name, "set")) {
// constructor that takes python associative collections
Utility::AddToClass(pyclass, "__real_init", "__init__");
Utility::AddToClass(pyclass, "__init__", (PyCFunction)SetInit, METH_VARARGS | METH_KEYWORDS);

#if __cplusplus <= 202002L
// From C++20, std::set already implements a contains() method.
Utility::AddToClass(pyclass, "__contains__", (PyCFunction)STLContainsWithFind, METH_O);
#endif
}

else if (IsTemplatedSTLClass(name, "pair")) {
Expand Down Expand Up @@ -1922,7 +1935,10 @@ bool CPyCppyy::Pythonize(PyObject* pyclass, const std::string& name)
Utility::AddToClass(pyclass, "__cmp__", (PyCFunction)STLStringCompare, METH_O);
Utility::AddToClass(pyclass, "__eq__", (PyCFunction)STLStringIsEqual, METH_O);
Utility::AddToClass(pyclass, "__ne__", (PyCFunction)STLStringIsNotEqual, METH_O);
#if __cplusplus <= 202302L
// From C++23, std::sting already implements a contains() method.
Utility::AddToClass(pyclass, "__contains__", (PyCFunction)STLStringContains, METH_O);
#endif
Utility::AddToClass(pyclass, "decode", (PyCFunction)STLStringDecode, METH_VARARGS | METH_KEYWORDS);
Utility::AddToClass(pyclass, "__cpp_find", "find");
Utility::AddToClass(pyclass, "find", (PyCFunction)STLStringFind, METH_VARARGS | METH_KEYWORDS);
Expand Down
Loading