aggregate struct object

should i still pass the object of an aggregate struct as const reference? does that still differs in performance?

example:
1
2
3
4
5
6
7
8
struct Point
{
    double x,y;
}

void val(const Point);
void ref(const Point&); 



This topic is extensively covered, try simple search like "pass by value vs pass by reference C++" etc.
Anyways, in short, passing by value makes a copy of the struct/class object first before it is passed to the function and whenever such copying is expensive there'll be a difference in performance. The following article ends with a fairly good list of when to pass by what http://www.cplusplus.com/articles/z6vU7k9E/
Topic archived. No new replies allowed.