C4663: C++ language change Topic is solved

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
furries
Experienced Solver
Experienced Solver
Posts: 53
Joined: Wed Jun 29, 2005 3:45 pm

C4663: C++ language change

Post by furries »

Hello,

I've been hard at work converting a program from MFC to wxWidgets but Ive run into a problem. Here is the error I get when I compile:

C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\vector(249) : warning C4663: C++ language change: to explicitly specialize class template 'vector' use the following syntax:
template<> class vector<bool,class std::allocator<unsigned int> > ...

Im not sure whats going wrong here, anyone know what this error is all about? It didn't used to be there, my guess is a problem with the project settings?

(I did post this in the general programming forum earlier by accident - any ops able to move it for me? :) )
Tyler
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 246
Joined: Fri Sep 03, 2004 12:37 am
Contact:

Post by Tyler »

That doesn't look so much like an error, as a warning? I'd imagine the fix may involve typcasting, but does this warning actually stop the compilation?
Frank
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 211
Joined: Sat Jan 01, 2005 6:19 pm

Post by Frank »

As the message suggetsts: You are using a deprecated C++ construct.

The Syntax for template specialisation has changed a few years ago.

Code: Select all

// Your Template-Class:

template<class T> class MyTemplateClass { ... };

//To specialize this class for int the old C++ Syntax was

class MyTemplateClass<int> { ... };

// The new C++ Syntax for template specialisation is now this:

template<> class MyTemplateClass<int> { ... };

furries
Experienced Solver
Experienced Solver
Posts: 53
Joined: Wed Jun 29, 2005 3:45 pm

Post by furries »

Thankyou, thats cleared it up nicely. Tyler, you are right, they are just warning and won't prevent compilation however I do have -alot- of them so I wanted to know why.

Cheers for the help!
Post Reply