No Subject

Alexandrescu, Andrei AlexandrescuA@MICROMODELING.COM
Sun Nov 8 18:11:00 GMT 1998


OS: Windows NT 4.0
Release: egcs 1.1, Release date: Sep 5, 1998.
Command-line options: none
Problem: The following code doesn't compile:

template <typename T>
class X
{
public:
	void foo(T)
	{
	}
};
int main()
{
	X<void> x;
	x.foo();	// error here
}

Error is:

no matching function for call to `X<void>::foo ()'
candidates are: X<void>::foo<void>(void)

I don't know whether this is a bug or the behavior should be that way.
Please let me know if I can help.

Andrei



More information about the Gcc-bugs mailing list