seqan
seqan copied to clipboard
PackedStrings for non-packables should be regular strings
One can create String<short, Packed<Alloc<> > >
which does not make sense, because short cant be packed. Doing this not only increases overhead, but does not work, i.e. the tests fail in some cases.
TODO:
- rename
String<TValue, Packed<THostspec> >
toPackedString_<TValue, THostspec >
- make a metafunction that
PackedType_<String<TValue, TSpec> >
that setsType
PackedString_<TValue, Spec >
iffBitsPerValue<TValue>::VALUE < sizeof(TValue) * 8
- otherwise the metafunction should set
Type
toString<TValue, THostspec >
, i.e. thePacked<>
is stripped - finally
String<TValue, Packed<THostspec> >
can be defined as inheriting from the metafunctionsType
- ultimately the tests can be added again
It would be more sinful to disable the Packed String spec on non-packable types. For that, it suffices to introduce PackableAlphabetConcept refining AlphabetConcept, then decorate the PackedString implementation with concept checking.
Ok, can you provide a few more hints to @smehringer on this? Thanks!
@h-2 is this problem considered for the seqan3::bitcompressed_vector? If so we could close it then.