Skip to content

Conversation

@vepadulano
Copy link
Member

This is the first part of #12449

I'm still trying to understand how to create a test. I used the original reproducer

template <typename T>
class Helper {

public:

  Helper() {}

  std::size_t operator() () const {
    const std::size_t res = 0;
    res = T{0, 0}.size();
    return res;
  }

};

template <typename H>
std::size_t call_helper(const H &helper) {
  return helper();
}

And ran it with root, but I see the same errors printed both after this changes and with ROOT master

Processing t.C...
In file included from input_line_8:1:
/Users/vpadulan/Programs/rootproject/t.C:10:9: error: cannot assign to variable 'res' with const-qualified type 'const std::size_t' (aka 'const unsigned long')
    res = T{0, 0}.size();
    ~~~ ^
/Users/vpadulan/Programs/rootproject/t.C:18:10: note: in instantiation of member function 'Helper<std::vector<double, std::allocator<double> > >::operator()' requested here
  return helper();
         ^
/Users/vpadulan/Programs/rootproject/t.C:24:5: note: in instantiation of function template specialization 'call_helper<Helper<std::vector<double, std::allocator<double> > > >' requested here
    call_helper(h);
    ^
/Users/vpadulan/Programs/rootproject/t.C:9:23: note: variable 'res' declared const here
    const std::size_t res = 0;
    ~~~~~~~~~~~~~~~~~~^~~~~~~
Assertion failed: (!m_Unloading && "Must not nest within unloading transaction"), function addNestedTransaction, file Transaction.cpp, line 98.

This is the first part of root-project#12449

Co-authored-by: Josh Bendavid <Josh.Bendavid@cern.ch>
@vepadulano vepadulano self-assigned this Jan 19, 2026
@vepadulano vepadulano requested a review from dpiparo as a code owner January 19, 2026 08:17
Use std::array to better handle the case of `sizeof(ColumnTypes)... == 0`.

Previously, errors such as this one could be seen:
```
/Users/vpadulan/Programs/rootproject/rootbuild/bendavid-template-1-relwithdebinfo/include/RooAbsDataHelper.h:146:25: error: cannot deduce actual type for variable '__range2' with type 'auto &&' from initializer list
      for (auto &&val : {static_cast<double>(values)...}) {
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/vpadulan/Programs/rootproject/rootbuild/bendavid-template-1-relwithdebinfo/include/ROOT/RDF/RAction.hxx:117:85: note: in instantiation of function template specialization 'RooAbsDataHelper<RooDataSet>::Exec<>' requested here
      ROOT::Internal::RDF::CallGuaranteedOrder{[&](auto &&...args) { return fHelper.Exec(slot, args...); },
                                                                                    ^
[...]
/Users/vpadulan/Programs/rootproject/rootbuild/bendavid-template-1-relwithdebinfo/include/ROOT/RDF/RVariedAction.hxx:160:24: error: no matching member function for call to 'Exec'
      fHelpers[varIdx].Exec(slot, GetValueChecked<ColTypes>(slot, varIdx, ReaderIdxs, entry)...);
      ~~~~~~~~~~~~~~~~~^~~~
[...]
/Users/vpadulan/Programs/rootproject/rootbuild/bendavid-template-1-relwithdebinfo/include/ROOT/RDF/RInterface.hxx:3579:14: note: in instantiation of function template specialization 'ROOT::RDF::RInterfaceBase::CreateAction<ROOT::Internal::RDF::ActionTags::Book, RooDataSet, ROOT::Detail::RDF::RLoopManager, RooAbsDataHelper<RooDataSet>, 0>' requested here
      return CreateAction<RDFInternal::ActionTags::Book>(/*columns=*/{}, resPtr, hPtr, fProxiedPtr, 0u);
             ^
```

Hinting at the fact that a `CreateAction` specialization would try to instantiate the helper to `Book` without columns.
@vepadulano
Copy link
Member Author

This PR is currently blocked by #20952

@github-actions
Copy link

Test Results

    22 files      22 suites   3d 23h 39m 25s ⏱️
 3 812 tests  3 809 ✅ 0 💤  3 ❌
76 720 runs  76 701 ✅ 7 💤 12 ❌

For more details on these failures, see this check.

Results for commit 25e1e2f.

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.

1 participant