Make "pal_supports" not a function
But rather a template vardecl, as per C++14
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user