File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -14,4 +14,4 @@ This file documents changes done for the stan-math project
1414 - L84 Wrapped the use of `-flifetime-dse` flag in conditional on non-WINARM64
1515 - L101 Wrapped the use of `-msse` in conditional on non-WINARM64
1616
17- - Add `constexpr` to lines 589-593 of `task.h` to fix a build failure in Clang 21.1
17+ - Added variants to the `kind_type` enum to prevent creation of out-of-range values
Original file line number Diff line number Diff line change @@ -376,7 +376,10 @@ class task_group_context : internal::no_copy {
376376public:
377377 enum kind_type {
378378 isolated,
379- bound
379+ bound,
380+ kind_complete,
381+ kind_detached,
382+ kind_dying
380383 };
381384
382385 enum traits_type {
@@ -586,10 +589,10 @@ class task_group_context : internal::no_copy {
586589 friend class task ;
587590 friend class internal ::allocate_root_with_context_proxy;
588591
589- static constexpr kind_type binding_required = bound;
590- static constexpr kind_type binding_completed = kind_type(bound+1 );
591- static constexpr kind_type detached = kind_type(binding_completed+1 );
592- static constexpr kind_type dying = kind_type(detached+1 );
592+ static const kind_type binding_required = bound;
593+ static const kind_type binding_completed = kind_type(bound+1 );
594+ static const kind_type detached = kind_type(binding_completed+1 );
595+ static const kind_type dying = kind_type(detached+1 );
593596
594597 // ! Propagates any state change detected to *this, and as an optimisation possibly also upward along the heritage line.
595598 template <typename T>
You can’t perform that action at this time.
0 commit comments