aboutsummaryrefslogtreecommitdiff
path: root/include/experimental/coroutine
diff options
context:
space:
mode:
Diffstat (limited to 'include/experimental/coroutine')
-rw-r--r--include/experimental/coroutine6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/experimental/coroutine b/include/experimental/coroutine
index 21c1ea566403..ce795ad452c0 100644
--- a/include/experimental/coroutine
+++ b/include/experimental/coroutine
@@ -250,9 +250,11 @@ public:
_LIBCPP_ALWAYS_INLINE
static coroutine_handle from_promise(_Promise& __promise) _NOEXCEPT {
+ typedef typename remove_cv<_Promise>::type _RawPromise;
coroutine_handle __tmp;
- __tmp.__handle_ = __builtin_coro_promise(_VSTD::addressof(__promise),
- __alignof(_Promise), true);
+ __tmp.__handle_ = __builtin_coro_promise(
+ _VSTD::addressof(const_cast<_RawPromise&>(__promise)),
+ __alignof(_Promise), true);
return __tmp;
}
};