I'll save you the time and give you a brief overview, because by the judging of the previous posts, it would be more beneficial.
The syntax you posted stems from templates. A template class template isn't a complete type. In order for it to become a complete type, you must instantiate the template class. This takes the same form as syntax as you posted. The types and/or values that sit between the angle brackets are called template-parameters. These parameters are used to fill the data needed to complete the template class template type. For instance:
1 2 3 4 5
|
template< typename T >
struct Sample
{
T Type;
};
|
Sample is not a complete type, because the type
T holds is not yet known. To complete the type, we must instantiate (create an object of)
Sample. When we do this, we pass the data the class needs in order for the compiler to complete the type. An analogy would be providing the missing puzzle pieces to complete the puzzle. For example:
By specifying
int, we've gave the compiler the missing information it needs to instance a
Sample. This in fact creates an entirely different type based on
int. In other words, if we instantiated
Sample with another type, such as
double, the compiler would generate another type based on
double. In effect, instancing a template twice with two different types would be equivalent to this:
1 2 3 4 5 6 7 8 9
|
struct Sample // Sample< int >
{
int Type;
};
struct Sample // Sample< double >
{
double Type;
};
|
Of course, this code won't compile, since its only to demonstrate what the compiler will see.
Hope this helps, mate :)
Wazzak