Skip to content

Commit

Permalink
change __indestructible so it is constinit constructible
Browse files Browse the repository at this point in the history
  • Loading branch information
ericniebler committed Jul 20, 2024
1 parent da98496 commit 5b1f4eb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/stdexec/__detail/__utility.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,11 @@ namespace stdexec {
template <class _Ty>
struct __indestructible {
template <class... _Us>
__indestructible(_Us&&... __us) noexcept(__nothrow_constructible_from<_Ty, _Us...>) {
::new (static_cast<void*>(std::addressof(__value))) _Ty(static_cast<_Us&&>(__us)...);
constexpr __indestructible(_Us&&... __us) noexcept(__nothrow_constructible_from<_Ty, _Us...>)
: __value(static_cast<_Us&&>(__us)...) {
}

~__indestructible() {
constexpr ~__indestructible() {
}

_Ty& get() noexcept {
Expand Down

0 comments on commit 5b1f4eb

Please sign in to comment.