Now, when struct are passed by value, there content is simply copied on the stack. But it is not always enough, for instance, when the structure contains a dynamic arrays or pointers, the copy could edit values of the source structure.
The copy should be copy constructed before being passed by value.
Now, when struct are passed by value, there content is simply copied on the stack. But it is not always enough, for instance, when the structure contains a dynamic arrays or pointers, the copy could edit values of the source structure.
The copy should be copy constructed before being passed by value.