Herb Sutter in GotW #91 Solution: Smart Pointer Parameters states " Thanks to structured lifetimes, the called function’s lifetime is a strict subset of the calling function’s call expression." Does this apply to asynchronous function calls?
void myFunc(Bar * arg);
...
auto bar = new Bar;
std::thread t1(myFunc,bar);
delete bar;
join t1;
I presume that in this case, deleting bar could invalidate the argument passed into myFunc on thread t1.