Make "pal_supports" not a function

But rather a template vardecl, as per C++14
This commit is contained in:
Nathaniel Filardo
2019-12-04 16:53:35 +00:00
parent 2567e8e4f3
commit 4d6759aca4
4 changed files with 5 additions and 8 deletions

View File

@@ -47,7 +47,7 @@ namespace snmalloc
// Use flat map is under a single node.
# define SNMALLOC_MAX_FLATPAGEMAP_SIZE PAGEMAP_NODE_SIZE
#endif
static constexpr bool USE_FLATPAGEMAP = pal_supports<LazyCommit>() ||
static constexpr bool USE_FLATPAGEMAP = pal_supports<LazyCommit> ||
(SNMALLOC_MAX_FLATPAGEMAP_SIZE >=
sizeof(FlatPagemap<SUPERSLAB_BITS, uint8_t>));