std::promise<R&> 的存储:"communicate objects"

Storage of std::promise<R&>: "communicate objects"

https://en.cppreference.com/w/cpp/thread/promise表示第一个特化(2)std::promise<R&>是"used to communicate objects between threads"。但是,我不知道如何使用此功能,也无法在网上的任何地方找到任何文档。我特别关心的是存储。如果我使用 std::promise<R&>,我传入的对象存储在哪里?

根据 https://en.cppreference.com/w/cpp/thread/promise/set_value ,...

我真的觉得这些签名很奇怪。我原以为右值引用变体是 std::promise<R&> 的一部分,因为这个是 "used to communicate objects between threads"。将一个对象传递给另一个线程听起来像 "move it into the associated state, such that the other thread can read it from of the associated state (preventing the object to be destructed as the thread that produced it exits)"。但是这个值好像是引用传进来的,而不是搬进来的。现在如果线程退出了会怎样?

使用 future/promise 在线程之间传递对象(而不是原语)的正确方法是什么?使用 std::promise<R&> 专业化的一个很好的例子是什么?

std::promise<R&> a; //stores the reference to R (a pointer with reference semantics)

std::promise<R>  b; //stores an internal R object.