Skip to content

Commit

Permalink
Missing vendored stl post--
Browse files Browse the repository at this point in the history
  • Loading branch information
mjp41 committed Feb 14, 2025
1 parent 1293ae8 commit e080db7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/snmalloc/stl/gnu/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,13 @@ namespace snmalloc
addressof(val), 1, order(MemoryOrder::SEQ_CST));
}

SNMALLOC_FAST_PATH const T operator--(int)
{
static_assert(stl::is_integral_v<T>, "T must be an integral type.");
return __atomic_fetch_sub(
addressof(val), 1, order(MemoryOrder::SEQ_CST));
}

SNMALLOC_FAST_PATH T operator-=(T decrement)
{
static_assert(stl::is_integral_v<T>, "T must be an integral type.");
Expand Down

0 comments on commit e080db7

Please sign in to comment.