mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2026-02-06 01:39:47 +08:00
msvc: avoid use of std::aligned_alloc as not available
This commit is contained in:
parent
7aa56c5f01
commit
e5eff19821
@ -36,7 +36,7 @@ void *new_delete_resource::allocate(std::size_t bytes, std::size_t alignment) no
|
||||
log.error("invalid bytes = ", bytes, ", alignment = ", alignment);
|
||||
return nullptr;
|
||||
}
|
||||
#if defined(LIBIPC_CPP_17)
|
||||
#if defined(LIBIPC_CPP_17) && !defined(LIBIPC_CC_MSVC)
|
||||
/// \see https://en.cppreference.com/w/cpp/memory/c/aligned_alloc
|
||||
/// \remark The size parameter must be an integral multiple of alignment.
|
||||
return std::aligned_alloc(alignment, ipc::round_up(bytes, alignment));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user