-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ntuple] Support all template parameters of STL containers #16754
Comments
As discussed, for |
Will the on-disk representation of vectors be the same for all possible allocators? Will it be possible to read back vectors with an allocator which was different than the one used when they were written? |
Very relevant questions; IMHO additional template parameters should not change the on-disk representation of STL containers, and it should be possible to transparently read them back with different parameters than at write time. If nothing is specified and the model is reconstructed, the user gets the default STL container as before. I think this would be compatible with the current state of the specification, otherwise we may need to think this through before declaring 1.0. |
To be more precise than just a thumbs up: I also think the on-disk representation should not depend on the allocator. |
For reference, this is already the case (for both questions, the answer is yes) for |
As pointed out by ATLAS, it's currently not possible to use a
std::vector
with a non-default allocator in RNTuple:leads to
This is because
RField
is only partially specialized forstd::vector<ItemT>
, so a non-defaultAllocator
falls back to the defaultRField
declaration (which assumes it's a class and checks that it's not instd
namespace).Note that in principle, this affects all STL containers. For many of them, there are other template parameters, for example
Hash
forstd::unordered_set
:leads to
The text was updated successfully, but these errors were encountered: