I had one class with test method with body;
class Object {
public:
Object(){
}
virtual ~Object(){
}
void test(){
}
};
I include this object.h
in 2 cpp files. Why is there no multiple definition error for functions Object::test
that is available (after include) in both cpp files?
I understand that a function with complete body is a definition and not declaration, so I expect there should be multiple definition error.
is there official article talk about it?