What is wrong with the following function template (Other than the fact that it really does almost nothing)?
```
template
int f( int & x )
{
return x;
}
int main()
{
int y = 3, z;
z = f(y);
}
```
There is a rule “Every template argument specified in the template-argument-list must be used in the argument of a function template.” (ARM, page 346.) The most recent C++ Standard provides syntax for instantiating such a template, but the text does not treat this. The Borland compiler complains thus:
```
Borland C++ 5.5 ch16ffnr9.cpp: Error 10: Could not find a match for 'f
```
You might also like to view...
Which of the following items are used to measure a blog's popularity?
a. Labels and blog comments b. Page views and blog spam c. Unique visitors and page views d. Blog comments and page views
A resume should be written in active voice instead of passive voice
Indicate whether the statement is true or false
One of the two locking options, Contents cannot be edited, enables you to delete, but NOT edit the content in the control
Indicate whether the statement is true or false
Which statement is true?
a) The members of a union can be of any type. b) The members of a union must all be of the same type. c) A union may not be assigned to another union of the same type. d) Unions may be compared to other unions of the same type.