Skip to content

Commit

Permalink
Add C++17 version for Mac. (#635)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjp41 committed Sep 18, 2023
1 parent 6b8f333 commit 2a7670e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ jobs:
dependencies: "rm -f /usr/local/bin/2to3 ; brew update && brew install ninja"
- os: "macos-12"
dependencies: "rm -f /usr/local/bin/2to3 ; brew update && brew install ninja"
- os: "macos-12"
variant: "C++17"
dependencies: "rm -f /usr/local/bin/2to3 ; brew update && brew install ninja"
cmake-flags: "-DSNMALLOC_USE_CXX17=ON"
# Add the self-host build, using the bounds-checked memcpy in
# maximally paranoid mode (checking loads and stores)
- os: "ubuntu-latest"
Expand Down
4 changes: 2 additions & 2 deletions src/snmalloc/backend_helpers/buddy.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ namespace snmalloc
template<typename Rep, size_t MIN_SIZE_BITS, size_t MAX_SIZE_BITS>
class Buddy
{
std::array<RBTree<Rep>, MAX_SIZE_BITS - MIN_SIZE_BITS> trees;
std::array<RBTree<Rep>, MAX_SIZE_BITS - MIN_SIZE_BITS> trees{};
// All RBtrees at or above this index should be empty.
size_t empty_at_or_above = 0;
size_t empty_at_or_above{0};

size_t to_index(size_t size)
{
Expand Down

0 comments on commit 2a7670e

Please sign in to comment.