Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix errors and warnings with C++20 in
FastTemplate.h
The destructor and assignment operators are not allowed to include template specializations in C++20. They were not needed anyway, because the class itself is templated. Also, generalize the assignment operators to take `TH1` and check for the dimension at runtime. This is necessary to avoid other compiler warnings, such as: ``` interface/FastTemplate.h:123:34: warning: ‘FastTemplate_t<T>& FastTemplate_t<T>::operator=(const TH1&) [with T = double]’ was hidden [-Woverloaded-virtual=] 123 | virtual FastTemplate_t & operator=(const TH1 &other) { | ^~~~~~~~ interface/FastTemplate.h:284:24: note: by ‘FastHisto2D_t<double>::operator=’ 284 | FastHisto2D_t& operator=(const TH2 &other) { ``` That is a very valid warning! `FastHisto2D_t` inherits from `FastTemplate_t`, and it's not good if their assignment operators take different types.
- Loading branch information