void doStuff( std::string const & s1, std::string const & s2="");
I was wondering if this code is legal in C++, for the s2 string. I want to have a default argument, but passing a reference and having an empty string as default. Will a temporary be created, and the reference will point to that temporary, or is it illegal C++?