3 ms·
> Well, nothing I suppose, except BaseClass cannot then be a template template <class T> void myFunc(List<T*>){ static_assert(stuff about T tha
by dragontamer 6y ago
> Well, nothing I suppose, except BaseClass cannot then be a template
template <class T>
void myFunc(List<T*>){
static_assert(stuff about T that you want to guarantee at compile time);
}
See here: https://en.cppreference.com/w/cpp/header/type_traits https://en.cppreference.com/w/cpp/header/type_traits
For a list of common functions used for compile-time type checking.
- Alupis 6y agoThank you for this conversation. You've given me some homework to read up on, and I appreciate it a lot!