2 ms·
If you wanted a factory that allocated vectors of a variety of known types, you'd probably declare template <typename T> before the generator function, so that
by noduerme 3y ago
If you wanted a factory that allocated vectors of a variety of known types, you'd probably declare template <typename T> before the generator function, so that on compilation a separate version of that function would be emitted for each type you passed to it.
(Not really a c++ expert, but that's my understanding; someone more knowledgeable can correct me).