Skip to content

Commit

Permalink
Resolved issues for Clang
Browse files Browse the repository at this point in the history
  • Loading branch information
refvalue committed Nov 14, 2024
1 parent b3b08b6 commit 926f9b4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/abi/memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,19 @@ void* es_aligned_alloc(std::size_t size, std::size_t alignment) noexcept {
}

void es_dealloc(void* ptr, std::size_t size) noexcept {
#if __cpp_sized_deallocation >= 201309L
::operator delete(ptr, size);
#else
::operator delete(ptr);
#endif
}

void es_aligned_dealloc(void* ptr, std::size_t size, std::size_t alignment) noexcept {
#if __cpp_sized_deallocation >= 201309L
::operator delete(ptr, size, std::align_val_t{alignment});
#else
::operator delete(ptr, std::align_val_t{alignment});
#endif
}

namespace essence::abi {
Expand Down

0 comments on commit 926f9b4

Please sign in to comment.