VC 7.1 Bug with namespaces

C

Christoph Rabel

Hi!

There is a small bug in VC7.1, the following code doesnt
compile while it should:

----
namespace Test {
template <long l> class foo { };
void Func(int& foo);
}

void Test::Func(int& foo) {
}

int main {}
----

It gives the following error (sorry, german)

error C2955: 'Test::foo': für die Verwendung einer
Vorlagenklasse ist eine Vorlagen-Argumentliste erforderlich

Just wanted to let you know,

Christoph
 
C

Carl Daniel [VC++ MVP]

That's a bug alright. You can consider it reported to Microsoft.

You did miss the () on the declaration of main, but after fixing that, it
still doesn't compile - producing the error you indicated.

-cd
 
C

Christoph Rabel

Carl said:
That's a bug alright. You can consider it reported to Microsoft.

You did miss the () on the declaration of main, but after fixing that, it
still doesn't compile - producing the error you indicated.

Copied the rest, wrote main by hand, sorry. ;-)
Thx for trying it.

Christoph
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top