[libcxx-commits] [libcxx] [libc++] Throw future_error in future.get() (PR #179409)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Fri Mar 6 10:13:51 PST 2026


================
@@ -985,6 +985,9 @@ future<_Rp>::~future() {
 
 template <class _Rp>
 _Rp future<_Rp>::get() {
+  if (__state_ == nullptr) [[unlikely]] {
----------------
ldionne wrote:

```suggestion
  if (__state_ == nullptr) [[__unlikely__]] {
```

https://github.com/llvm/llvm-project/pull/179409


More information about the libcxx-commits mailing list