Add C++17 version for Mac. (#635)
This commit is contained in:
committed by
GitHub
parent
6b8f3338c7
commit
2a7670eb82
4
.github/workflows/main.yml
vendored
4
.github/workflows/main.yml
vendored
@@ -44,6 +44,10 @@ jobs:
|
|||||||
dependencies: "rm -f /usr/local/bin/2to3 ; brew update && brew install ninja"
|
dependencies: "rm -f /usr/local/bin/2to3 ; brew update && brew install ninja"
|
||||||
- os: "macos-12"
|
- os: "macos-12"
|
||||||
dependencies: "rm -f /usr/local/bin/2to3 ; brew update && brew install ninja"
|
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
|
# Add the self-host build, using the bounds-checked memcpy in
|
||||||
# maximally paranoid mode (checking loads and stores)
|
# maximally paranoid mode (checking loads and stores)
|
||||||
- os: "ubuntu-latest"
|
- os: "ubuntu-latest"
|
||||||
|
|||||||
@@ -15,9 +15,9 @@ namespace snmalloc
|
|||||||
template<typename Rep, size_t MIN_SIZE_BITS, size_t MAX_SIZE_BITS>
|
template<typename Rep, size_t MIN_SIZE_BITS, size_t MAX_SIZE_BITS>
|
||||||
class Buddy
|
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.
|
// 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)
|
size_t to_index(size_t size)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user