Template parameters and arguments
I have several questions while reading "C++ Templates: The Complete Guide/David Vandevoorde, Nicolai M. Josuttis"
Code:
template<int I> void f(int (&)[24/(4+I)]);
int main()
{
&f<4>;
}
1. What is that type: int(&)[3] ? is it reference to a fix sized array of 3 integers?
2. what is the meaning/result of the statement in main
and how do I call function f (assuming I'd add an implementation to the template fuction decleration)
I failed to compile it on Dev-cpp 4.9.9.2 : gcc 3.4.2
though succeded with Comeau 4.3.3 online compiler -
which leads me to another question - what is a recommended C++ compiler
that supports the most of templates features?
**** **** **** **** **/**