Should my class declare a member function or a friend function?