On Sunday, 8 April 2007 17:17, Shriramana Sharma wrote: > I agree of course that in case of tiny tidbits of parameters like a few > int-s, double-s or even std::string-s, there is not much meaning in > using const ref-s, and it is more intuitive to pass these by value. It > is only practically useful to pass big classes / struct-s by reference. Well, std::string should be passed by const reference. Depending on the implementation, passing std::string by value may involve heap allocation/deallocation and memory copy operations which are quite costly. Adam - To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html