In specializing a class template, I would like to have one specialization target full-blown classes (complete with constructor, destructor, etc.) and one specialization target primitives (int, float, etc.). The only partial specialization I’ve seen is with targeting pointer types (via T*). Is there a way to do this?
In specializing a class template, I would like to have one specialization target full-blown
Share
You can used C++11 type_traits. Here is something to get you started, you can specialize more as needed: