Skip to content

Conversation

@guitargeek
Copy link
Contributor

The TF1, TF2, and TF3 constructors for CINT compatibility can be removed. This concerns the templated constructors that additionally took the name of the used functor class and member function. With ROOT 6, these names can be omitted.

See also commit 4e4cdfb from 2015, where these constructors were introduced.

The idea is to clear a bit more the jungle of TH1 constructors, of which there are too many. That makes it confusing for our uses and for cppyy overload resolution.

The `TF1`, `TF2`, and `TF3` constructors for CINT compatibility can be
removed. This concerns the templated constructors that additionally took
the name of the used functor class and member function. With ROOT 6,
these names can be omitted.

See also commit 4e4cdfb from 2015, where these constructors were
introduced.

The idea is to clear a bit more the jungle of `TH1` constructors, of
which there are too many. That makes it confusing for our uses and for
cppyy overload resolution.
@github-actions
Copy link

Test Results

    21 files      21 suites   3d 20h 56m 45s ⏱️
 3 784 tests  3 784 ✅ 0 💤 0 ❌
77 535 runs  77 535 ✅ 0 💤 0 ❌

Results for commit 3e94437.


// backward compatible interface
template <typename Func>
TF1(const char *name, Func f, Double_t xmin, Double_t xmax, Int_t npar, const char *, EAddToList addToGlobList = EAddToList::kDefault) :
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we deprecate them first or are we sure they were only use by/via CINT?

Copy link
Contributor Author

@guitargeek guitargeek Dec 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see why anyone would use these constructors otherwise, as it's not needed in C++ to pass the name of the class instance Func as a separate argument.

The reason why I think we can remove it without deprecation is that the replacement is trivial and backwards compatible: just drop these const char* inputs at the end. But if you're more comfortable with a deprecation period, I have no problem.

Maybe @lmoneta also has a opinion there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants