Re: [algogeeks] Re: parameters to non-const and const reference concept-C++

2012-12-23 Thread Arun Vishwanathan
@Lucifer: Thanks a lot for the explanation On Sun, Dec 23, 2012 at 4:51 AM, Lucifer wrote: > @phoenix > > The reason is not an implication of using references. > If u are passing emptyvec() as an argument then the vector returned by > emptyvec() is a temp object ( as its not being assigned to a

[algogeeks] Re: parameters to non-const and const reference concept-C++

2012-12-23 Thread Lucifer
@phoenix The reason is not an implication of using references. If u are passing emptyvec() as an argument then the vector returned by emptyvec() is a temp object ( as its not being assigned to a obj var created by the programmer), which means that the user/programmer shouldn't be able to change