BUG: C2955 Error When You Use a Template Name as a Function Argument (275674)



The information in this article applies to:

  • Microsoft Visual C++, 32-bit Enterprise Edition 6.0
  • Microsoft Visual C++, 32-bit Professional Edition 6.0
  • Microsoft Visual C++, 32-bit Learning Edition 6.0

This article was previously published under Q275674

SYMPTOMS

You may receive the following error message if you try to use a template name as a function argument:
error C2955: 'S' : use of class template requires template argument List
Please refer to the sample code in the "More Information" section for details.

RESOLUTION

Use a different name for the template class or the function argument.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce Behavior

The following sample code demonstrates the bug:
// Test.cpp
// Compiler option needed: none

template <class T>
struct S { };

int hoo (int *S);
				

Modification Type:MinorLast Reviewed:7/5/2005
Keywords:kbBug kbCompiler kbLangCPP KB275674