Do all STL containers return their elements by reference?

Returning the added element, or the container in container member functions is not possible in a safe way. STL containers mostly provide the "strong guarantee" . Returning the manipulated element or the container would make it impossible to provide the strong guarantee (it would only provide the "basic guarantee").

An explanation of these terms is provided at boost's website on Exception-Safety in Generic Components . See below from Boost's website .

Yes the overloaded operator for stl containers return a reference. So in your examples above the values in m and elements will be altered.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions