Skip to content

Commit 1ea4e08

Browse files
committed
Try: Mark some parts of task.h as constexpr for clang 21.1
1 parent c8beeaf commit 1ea4e08

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

lib/tbb_2020.3/STAN_CHANGES

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@ This file documents changes done for the stan-math project
1313
- build/windows.gcc.inc
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
16-
16+
17+
- Add `constexpr` to lines 589-593 of `task.h` to fix a build failure in Clang 21.1

lib/tbb_2020.3/include/tbb/task.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -586,10 +586,10 @@ class task_group_context : internal::no_copy {
586586
friend class task;
587587
friend class internal::allocate_root_with_context_proxy;
588588

589-
static const kind_type binding_required = bound;
590-
static const kind_type binding_completed = kind_type(bound+1);
591-
static const kind_type detached = kind_type(binding_completed+1);
592-
static const kind_type dying = kind_type(detached+1);
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);
593593

594594
//! Propagates any state change detected to *this, and as an optimisation possibly also upward along the heritage line.
595595
template <typename T>

0 commit comments

Comments
 (0)