Hi!
I am encountering a problem when trying to persist an std::array of template class objects. When I have a data member in my class C
like std::array<A<int>> foo
, where A
is a class template, I get the following error when I write a C
object to file:
Error in <TStreamerInfo::Build>: C, unknown type: A foo
However when I hardcode the type of the class template (making it a regular C++ class), persisting the class works fine and I get no error. I also tried std::vector<A<int>> foo
which also seem to persist without a problem.
I made a reproducer that can be found here: https://github.com/Senui/root_io_template_array
In the reproducer class A
is a template, class B
is a regular C++ class, and class C
contains the STL containers of class A
and B
. Can anyone tell me why my std::array<A<int>, 3>
object cannot persist? And can I fix this or is it not supported yet?
Best,
Ahmad
Edit: using ROOT v6.08.06 (which should have support for std::array)