diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index be96704f6..4855549fa 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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" diff --git a/src/snmalloc/backend_helpers/buddy.h b/src/snmalloc/backend_helpers/buddy.h index ff9416614..d7cfd17b6 100644 --- a/src/snmalloc/backend_helpers/buddy.h +++ b/src/snmalloc/backend_helpers/buddy.h @@ -15,9 +15,9 @@ namespace snmalloc template class Buddy { - std::array, MAX_SIZE_BITS - MIN_SIZE_BITS> trees; + std::array, 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) {