File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -540,13 +540,15 @@ namespace experimental::execution
540540 [[nodiscard]]
541541 constexpr auto disposition () const noexcept -> __task::disposition
542542 {
543- // NOLINTNEXTLINE(modernize-avoid-c-arrays)
544- STDEXEC_CONSTEXPR_LOCAL __task::disposition __map[] = {__task::disposition::stopped,
545- __task::disposition::succeeded,
546- __task::disposition::failed};
547- // index() returns 0 for success, 1 for error, and -1 for stopped, so add 1 to
548- // get the correct disposition.
549- return __map[this ->__data_ .index () + 1ul ];
543+ switch (this ->__data_ .index ())
544+ {
545+ case 0 :
546+ return __task::disposition::succeeded;
547+ case 1 :
548+ return __task::disposition::failed;
549+ default :
550+ return __task::disposition::stopped;
551+ }
550552 }
551553
552554 constexpr void unhandled_exception () noexcept
You can’t perform that action at this time.
0 commit comments