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

@@ -190,7 +190,7 @@ namespace snmalloc
SNMALLOC_FAST_PATH
uint64_t low_memory_epoch()
{
if constexpr (pal_supports<LowMemoryNotification, PAL>())
if constexpr (pal_supports<LowMemoryNotification, PAL>)
{
return PAL::low_memory_epoch();
}
@@ -203,7 +203,7 @@ namespace snmalloc
template<bool committed>
void* reserve(size_t* size, size_t align) noexcept
{
if constexpr (pal_supports<AlignedAllocation, PAL>())
if constexpr (pal_supports<AlignedAllocation, PAL>)
{
return PAL::template reserve<committed>(size, align);
}