What does synthesized method first required here mean?
Hi Everyone.
I'm getting a few messages like this from the gcc (version 4.1.2) compiler.
[cc] /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/stl_construct.h:81: note: synthesized method ‘mynamespace::MyClass::MyClass(const mynamespace::MyClass&)’ first required here
I'm not sure what changed last or when these started as I have not been working in this code for a while and others have.
From researching I think this is the compiler telling me when it is using a compiler generated function (copy constructor or assignment operator) but what is the reason for this "note"?
It seems like there might some concern or the compile would not be telling me about it.
Thanks for the help.
Re: What does synthesized method first required here mean?
Can't you figure it out based on the messages following the message you posted?
There should be more information in the following lines i think.
Re: What does synthesized method first required here mean?
I think may be you are creating a class object something like this
Class A{}; // which is non-copayable
A a = A(); // That's why you be may error error as such.
Try
A a();