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

[DF] Reading/writing std::vector<bool> and C-arrays of bool is broken

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Blocker
    • Resolution: Fixed
    • 6.14/04
    • 6.16/00
    • None
    • None
    • any

    Description

      Since TTreeReaderArray<bool> does not deal correctly with std::vector<bool> (see ROOT-9570), neither does RDataFrame when reading std::vector<bool> as RVec<bool>.

      A workaround would be to read such columns with TTreeReaderValue<std::vector<bool>> but since users, by design, use RVec<bool> to indicate both a vector<bool> and a bool[], this workaround breaks I/O of C-arrays of booleans.

      Another option is to complain at runtime if we notice that an RVec<bool> is being used to read a std::vector<bool> column, suggesting to directly use a std::vector<bool> instead.

      This issue is also a reminder that we must include tests for reading/writing of std::vector<bool> as well as fixed and variable sized arrays of booleans to be sure that all cases are dealt with appropriately.

      Attachments

        Issue Links

          Activity

            People

              dpiparo Danilo Piparo
              eguiraud Enrico Guiraud
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Actual Start:
                Actual End: