Is a temporary created as part of an argument to a function call guaranteed to stay around until the called function ends, even if the temporary isn\'t passed directly to th
§12.2/3: "Temporary objects are destroyed as the last step in evaluating the full-expression (1.9) that (lexically) contains the point where they were created."
IOW, you're safe -- the A object must not be destroyed until after foo returns.