C++ Partial template specialization - design simplification
问题 I am working on a pipeline/dataflow design pattern. I have a class 'algorithm data output' ( AlgorithmOutput ) that acts as an interface between two connected network segments. In particular, it provides method templates getOutput<size_t N> that are used for the data output from an object of the type 'data transmitter'. The current design is based on the idea that users derive from the class AlgorithmOutput and provide a finite number of implementations of the method template getOutput<size_t