We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TIter &TIter::operator=(TIterator *it)
Copy post from Mattermost:
Normally one writes:
TList *lst = new TList(); TIter iter(lst);
This works fine.
In many places of RooFit (and also in some other classes) one can see following syntax:
TIter iter = lst->MakeIterator();
It is also fine while where is constructor signature TIter(TIterator *it). But if one does again:
iter = lst->MakeIterator();
One do not get that one expects. While C++ does:
TIter
TIterator
lst->MakeIterator()
Means we have unnecessary duplication of TIterator in between. Moreover, following code MAY produce wrong results:
iter = lst->MakeIterator(kIterBackward);
It depends if assign operator implemented properly for derived TIterator classes. Probably, we should define assign operator abstract:
virtual TIterator &operator=(const TIterator &) = 0;
To ensure that all derived classes implement it
The text was updated successfully, but these errors were encountered:
Provide assign operator for TIter
e6eaf71
Let assign TIterator* directly without need of creating temporary TIter object in between. Solves root-project#7633
231075c
Let assign TIterator* directly without need of creating temporary TIter object in between. Solves #7633
1a8dd64
linev
pcanal
Successfully merging a pull request may close this issue.
Copy post from Mattermost:
Normally one writes:
This works fine.
In many places of RooFit (and also in some other classes) one can see following syntax:
It is also fine while where is constructor signature TIter(TIterator *it).
But if one does again:
One do not get that one expects. While C++ does:
TIter
instance with originalTIterator
object which was created bylst->MakeIterator()
.Means we have unnecessary duplication of
TIterator
in between. Moreover, following code MAY produce wrong results:It depends if assign operator implemented properly for derived
TIterator
classes.Probably, we should define assign operator abstract:
To ensure that all derived classes implement it
The text was updated successfully, but these errors were encountered: