When using __declspec(dllexport)
, should overloaded operators also have this exportation flag assigned? For example, say you have something like:
/*
Overloaded operator (equivalent operator) returns true if x equals compared vector
*/
__declspec(dllexport) bool operator ==(const vector &v)
{
return (x == v.x && y==v.y && z==v.z);
}
Is the __declspec(dllexport)
necessary in order to use ==
on your class type? Or should that not be exported because it's specific to that class and any inherited classes?