Today I answered this question on StackOverflow.
The OP was asking what was wrong with his piece of code, and the answer was that he was missing the
template keyword. The OP was likely unaware of the possibility of using that keyword in that context. He just could not figure out why his program was not working.
Now the question has been closed and marked as a duplicate of another question asking when and why the
typename keywords should be used.
Although this latter (very long) Q&A does indeed provide the information that would have led the OP to the solution:
- He could have never found it, because he would not even think of searching for answers related to that keyword;
- It provides way more information than he needs to fix his program.
So my question is: is it correct to close his question as a duplicate? My feeling is that it is not, and the linked Q&A should only be provided as an additional information to a dedicated answer.