I am trying to understand a template class in C++. First, I would like to understand what this line means:
template <typename T, typename Ord = columns, typename All = abc::allocator<T,16> >
class matrix
where columns and allocator are respectively a struct and a class defined somewhere else (the second in the namespace abc). What troubles me is the fact that it seems to have a typename which has already been initialized. What does this mean? Should I also initialize the typename of Ord and All when I want to use this template?
Besides, there is also this only constructor:
explicit matrix(unsigned int rows = 0, unsigned int cols = 0, T init = T())
but it seems to have already been initialized. And what should init mean?
I assure you that I looked at all the code, but there is nothing that helps to understand better. Thank you for your attention.
Edit: Thank you everybody for your answers. Just a little reassurance (I am a noob in C++):
int const& operator() operator()(unsigned int i, unsigned int j) const
This method means that, when we initialize the class foo, we can call it by foo()(1,2), where i=1 and j=2. Am i right? And what do the two "const" refer to?
Thank you again!