B
Benny Hill
I have a map in a class and when I compile I get an error in the
overloaded assignment operator but not in the copy constructor:
typedef std::map<wxString, const void*> MethodMap;
MethodMap mMethods;
MethodMap hePlugin::GetAllMethods(){return mMethods;}
// This works...
hePlugin::hePlugin(const hePlugin& plugin) : mMethods(plugin.GetAllMethods()){
}
// This doesn't...
const hePlugin hePlugin:
perator = (const hePlugin& plugin){
mMethods(plugin.GetAllMethods()); <== error
return *this;
}
The error I get when compiling (gcc 3.2.2 on RedHat 9) is:
no match for call to `(MethodMap) (MethodMap)`
Thanks in advance for any help!
overloaded assignment operator but not in the copy constructor:
typedef std::map<wxString, const void*> MethodMap;
MethodMap mMethods;
MethodMap hePlugin::GetAllMethods(){return mMethods;}
// This works...
hePlugin::hePlugin(const hePlugin& plugin) : mMethods(plugin.GetAllMethods()){
}
// This doesn't...
const hePlugin hePlugin:
mMethods(plugin.GetAllMethods()); <== error
return *this;
}
The error I get when compiling (gcc 3.2.2 on RedHat 9) is:
no match for call to `(MethodMap) (MethodMap)`
Thanks in advance for any help!