Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-8885

Cannot create a branch of long, unsigned long, std::size_t types

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • None
    • 6.24/00
    • TTree
    • None
    • ROOT

    Description

      Reproducer:

      root [0] TTree t
      root [1] unsigned long a
      root [2] t.Branch("a", &a)
      Error in <TBranch::TLeaf>: Illegal data type for a/a/
      (TBranch *) nullptr

      I know that Long64_t and ULong64_t can be used instead, but with no-super-high priority I think it would be nice to users if we supported these types. Especially std::size_t might pop up in code pretty often if branches are created like this:

      root [0] std::vector<int> v
      root [1] auto size = v.size()
      root [2] TTree t
      root [3] t.Branch("s", &size)
      Error in <TBranch::TLeaf>: Illegal data type for s/s/
      (TBranch *) nullptr

      Attachments

        Activity

          People

            eguiraud Enrico Guiraud
            eguiraud Enrico Guiraud
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: