Changed when_any to be used with temporaries