Could somebody guide me through what gets called in this scenario?
template<class T>
class mat4 {
public :
T matrix[4][4];
mat4();
mat4(vec4<T> i, vec4<T> j, vec4<T> k, vec4<T> t);
mat4(const T input_matrix[4][4]);
//~mat4();
mat4<T> Transposed() const;
void Transpose();
mat4<T> Inversed() const;
void Inverse();
};
With the above code if i call
mat4<float> matrix;
float mf[4][4];
//fill the float matrix here
matrix = mf;
Then i know that the 3rd constructor gets called (it's not explicit), but what is called beside that? A copy constructor for matrix that takes the temporary object created from the assignment operation? I'm debating whether or not i should create a custom assign operator for it or just let it handle itself. The custom operator would only copy the matrix into the mat4 and return a reference to the mat4, but if there's no overhead in the automaticly created assignment operator then i'd rather stick to that.