#include #include using namespace std; //code void compute(promise &ref) { ref.set_value(9); } int main() { std::promise prom; std::thread(compute, ref(prom)).detach(); cout << prom.get_future().get() << '\n'; } //=