Is it a good idea to use constructor calls as arguments? E.g. something like
doSomething(ClassA(someConstructorParameter));
Will the object be destroyed when the function terminates? Or if you have a function that takes a char* and you don't want it to mess up a string, would
someFunction(string(str).c_str());
be a bad idea?