Calling template function within template class, with template return type || assigning template type during function call


In c++, you have to determine which type of data T holds during compile time otherwise.
It will throw,  template argument deduction/substitution failed:
                        couldn't deduce template parameter 'E'

ADS_set<size_t> a;
a.w<size_t>();           // This way size_t will be reside in the template


Comments

Popular posts from this blog