Should you pass member variables in member functions?
There is no need to pass member variables to member functions, because member functions have access to all data elements.
It is similar to free functions accessing static local variables of a file. Functions have access to statically declared variables in the same translation unit.
When should you use a standalone function and when should you use a member function?
In general, use a member function when functionality is associated with an object.
Use the standalone function when
You can also use autonomous functions when the same functionality can be applied to different objects.
For example, let’s talk about serializing or outputting an object.
You can define the load_from_buffer() method in the load_from_buffer() , but it will not work with POD types.
However, if the load_from_buffer() function is executed separately, it can be overloaded for different types, such as int , char , double and with templates, overloading can be done to call objects received from the interface.
Summary
They prefer to use member methods when they require access to the data elements of an object. Use static member methods when they access static data members or there is a need for functions without an object instance (I think encapsulation). Free functions also provide functionality for different objects based on function overloading.
There are no hard and fast rules, just use what you think will be the easiest way to support, help in the correctness and reliability and speed up development.
To embarrass people, here is an article by Scott Meyers:
How Non-Member Functions Increase Encapsulation
Remember that in order for a free access function to access data elements of an object, data members must be granted public access, or the function must be a friend of the object. A classic example is overloading stream statements for a class.