2 ms·
A strategy template parameter works well in this case - parameterize the type.
by kzrdude 6y ago
A strategy template parameter works well in this case - parameterize the type.
- dataflow 6y agoI'd disagree on that. That would create 2 unrelated types when in fact one of the classes here semantically really is more like a subclass of the other one. Additionally, that creates additional work for the compiler both for this class (makes it hard to put the definition in an implementation file) and for its users (containers will now get instantiated and codegened for each type separately).