i know there is little chance i will need to use overloaded operators but im trying to remember how just in case i do. the problem is outside of remembering that with operator= i need to check for self assignment im having trouble remembering the params of all the operators. is this just a matter of experience. like some require a constant reference like the == operator (i think) while others dont use constant while still others dont use any reference at all. i just dont know if i should move on with my learning and just have to look it up when i need them or if i should study them more so i know and write them down. i really wanna know this stuff.
im having trouble remembering the params of all the operators.
There isn't really anything special you have to remember. They're just like any other function.
like some require a constant reference
Passing by value or by const reference is something you should be familiar with for all C++ coding. It is nothing that is specific to operator overloading. It applies to any function all the same.
Passing by value creates a copy.
Passing by const reference does not.
i know the difference between pass by reference and pass by value. its just that i keep forgetting which one it calls for. im guessing i just have to write it more my memory isnt that great.