Open oktaal opened 2 years ago
If sv
must be polymorphic in some cases, then it could be a problem, although you could list the permitted types using std::variant
instead of using basicStats
(or structStats
) as a wildcard.
It's hard to tell from the code immediately. Are there cases where sv
should be polymorphic?
See:
https://github.com/UUDigitalHumanitieslab/tscan/pull/61#discussion_r990038148
The problem is that
struct basicStats
(which is the base forwordStats
) contains the definition:https://github.com/UUDigitalHumanitieslab/tscan/blob/bec422ccb74a3c88ef329dfbc0b925021d0bf8fa/include/tscan/stats.h#L107
This makes it harder to introduce generic type because this would introduce a circular type dependency e.g.: