News for hackers. Stuff that matters.
Re:C Template Library by aw1621107 on Wednesday December 30, 2020 @03:40PM (#25585820)
Why not

    template<typename T>
    void my_func(std::vector<T>& vec);
?

The reference (or use a pointer, if you want) ensures that derived types can be passed, and the template allows for any parameterization to be used.

There are no comments on this comment yet.