Handling of "bit-patterns" is inconsistent. The dynamic_bitset takes string literals"0101" while the shape gets an extra strong type that is initialised with a numeric literal in binary notation: bin_literal{0b10101}.
I suggest the following:
rename bin_literal to bits
give bits a constructor from number and one from string_view.
introduce 0b101_bits and "101"_bits as user defined literals of type bits.
Use bits in the constructors of dynamic_bitset and shape.
Thoughts: 2020-11-10
shape gets strong_type for ungapped{5} or bin_literal{0b10101} -> "101"_bits
we have already a literal: 0b101011_shape -> shape // static
can we have 10_ungapped_shape -> shape ungapped of size 10? not possible as runtime parameter
seqan2 has: dynamic_gapped_shape, dynamic_ungapped_shape, static_gapped_shape and static_ungapped_shape
extension of shapes as static/dynamic, idea: use first class templates using mechanism like in span.
RESOLUTION: we need more use cases: document it as NO_API/Experimental must not be stable for 3.1 TODO: which dependencies are affected.
Description
Handling of "bit-patterns" is inconsistent. The
dynamic_bitset
takes string literals"0101"
while the shape gets an extra strong type that is initialised with a numeric literal in binary notation:bin_literal{0b10101}
.I suggest the following:
bin_literal
tobits
bits
a constructor from number and one from string_view.0b101_bits
and"101"_bits
as user defined literals of typebits
.bits
in the constructors of dynamic_bitset and shape. Thoughts: 2020-11-10ungapped{5}
orbin_literal{0b10101}
-> "101"_bits0b101011_shape
-> shape // static10_ungapped_shape
-> shape ungapped of size 10? not possible as runtime parametercreated from https://github.com/seqan/product_backlog/issues/244